r/java • • Mar 31 '22

Introduction to Web Scraping With Java

https://www.scrapingbee.com/blog/introduction-to-web-scraping-with-java/
327 Upvotes

38 comments sorted by

View all comments

0

u/[deleted] Mar 31 '22

[deleted]

10

u/Worth_Trust_3825 Mar 31 '22

Who wouldn't? What do you propose using instead? Does it matter if you interface with selenium with firefox in ruby or c#? Is there a quality difference in using prolog over cobol? All you do is write to a socket, and read from a socket, then process, and write to another socket. For all you care, you can do all of that manually. Your goal is not to use java, after all.

5

u/GrayDonkey Mar 31 '22

Puppeteer under NodeJS is the industry norm when you need to support JS rendering.

HtmlUnit is an interesting choice, usually I use JSoup for Java based scraping. It's faster than Puppeteer but you have to ensure the content is static or uses server-side rendering.

3

u/Worth_Trust_3825 Apr 01 '22

Again, what's the difference between chromedriver/equivalent to puppeteer? You're running an entire browser under the hood anyways.