Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
When I wanted to learn I just found an online store to practice on, it worked out well.
-
First of all, make sure you're only scraping things you are allowed to. Also make sure you're not doing it every few seconds, but perhaps one or twice a day (depending on what you're using it for)
For starters you must get the actual data. For that I'd recommend Axios (https://github.com/axios/axios)
For actually parsing the HTML id recommend one out of two libraries. If you're familiar with jQuery Cheerio might be nice to use (https://github.com/cheeriojs/...). The downside is that is doesn't execute Javascript or apply CSS. If you need that I'd go with a popular alternative, JSDOM (https://github.com/jsdom/jsdom). It might be a little bit more challenging to get the grasp of, but it offers a few extra tricks.
Can anyone suggest me good practice for scrapping website using js?
question