简体   繁体   中英

Web scraping: How to get specific element from some page?

I'm developing some scraping software to check if products price are changed or not. To do this I'm sending Web http request to get product page, it returns me whole html page. There are a lot of items to check so I'm doing it in parallel so my internet bandwidth runs out quickly

The main questions:

Is it possible to send Web http request with select query to get only specific element from html page ?

Your best (free / cheap) bet is the Html Agility Pack. There are automated solutions out there that have a UI where you stick in the URL and then just point and click to the elements that you want to extract and they generate the info for you. Big $$$ for that stuff though :(. With the Html Agility Pack, you have to create the "xpath" by hand.

You can't unless the target server supports Range Request. You can send a request to test if the target server accents range request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM