This a web scraping Rails application that can also be used solely as an API.
git clone https://github.com/wvicioso/rails_scraper.git && cd rails_scraper
bundle install && rake db:create && rake db:migrate && rake db:seed && rails s
route: 'http://localhost:3000/websites'
method: 'get',
headers: { Accept: 'application/json', 'Content-Type': 'application/json' }
{
status: 200,
1: {
link: "url"
h1Tags: [],
h2Tags: [],
h3Tags: [],
},
2: {
link: "url"
h1Tags: [],
h2Tags: [],
h3Tags: [],
}
}
route: 'http://localhost:3000/websites/{website-id}'
method: 'get',
headers: { Accept: 'application/json', 'Content-Type': 'application/json' }
{
status: 200,
link: "url",
h1Tags: [],
h2Tags: [],
h3Tags: [],
}
route: 'http://localhost:3000/websites'
method: 'post',
body: JSON.stringify({
link: 'url',
}),
headers: { Accept: 'application/json', 'Content-Type': 'application/json' }
{
status: 200,
link: "url",
h1Tags: [],
h2Tags: [],
h3Tags: [],
}
- go to
http://localhost:3000/
in your web browser
- use the app freely