Skip to content

fraz017/tags-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project parses the selective tags

  • Rails

  • sqlite

  • Clone from the repo

run the following commands bundle install rake db:create rake db:migrate rails s

These steps will setup the project and get you running

There are two api routes

  • /scrape (which accepts a url and parse selective tags)

http://localhost:3000/scrape?url="you url"

  • /list (which show all previous urls and their scraped content)

http://localhost:3000/list

Table name is =Content

  • source_link (url which is beign scraped)

  • h1 (array of all the h1 content in the page)

  • h2 (array of all the h2 content in the page)

  • h3 (array of all the h3 content in the page)

  • extracted_hrefs (array of all the href’s content in the page)

A sample response of the API <tt>{

"message": "Url Parsed",
"data": {
  "source_link": "url i passed",
  "h1": [
    "Content", "Content"
  ],
  "h2": [
    "Content", "Content"
  ],
  "h3": [
    "Content", "Content"
  ],
  "extracted_hrefs": [
    "Content", "Content"
  ]
}

}</tt>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published