Skip to content

Metadata parser to parse open graph and other important information like title, description and images from a given URL.

Notifications You must be signed in to change notification settings

dpk07/metadata-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metadata-parser

A web backend to scrape metadata.

Running Metadata Parser locally

Metadata Parser is a Node Js application.

git clone https://github.com/dpk07/metadata-parser.git
cd metadata-parser
npm install
npm start

Working with Metadata Parser in your IDE

Prerequisites

The following items should be installed in your system:

Steps:

  1. On the command line

    git clone https://github.com/dpk07/metadata-parser.git
    
  2. Inside VS Code

    File -> Open Folder -> metadata-parser
    

    Run the application by running npm start in the console.

Run Unit Tests:

  1. On the command line
    npm run test
    

Code coverage:

  1. On the command line
    npm run coverage
    

Looking for something in particular?

Important files Link
The App.js File app
Dependencies package.json
Unit Tests Tests
Supported Tags tags.js

Try it out

Postman

Steps:

  1. Open Postman

  2. Do a post request to

    http://localhost:3000/scrape
    
  3. Pass a json object in the body with the following structure. For example:

    {url:"https://ogp.me"}

  4. Response will have all the scraped tags.

    {
     "title": "Open Graph protocol",
     "type": "website",
     "url": "https://ogp.me/",
     "description": "The Open Graph protocol    enables any web page to become a rich object in a social graph.",
     "image": {
         "type": "image/png",
         "width": "300",
         "height": "300",
         "alt": "The Open Graph logo",
         "url": "https://ogp.me/logo.png"
       }
     } 
    

About

Metadata parser to parse open graph and other important information like title, description and images from a given URL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published