Java: How to Web Scrape using HtmlUnit

preview_player
Показать описание
I needed a list of new year resolutions, therefore I created a simple java web scraper that could get me this information. The Java Web Scraper is built using HtmlUnit.

My channel publishes videos regarding programming, software engineering, especially Java and JavaFX. If that is what you are looking for then do not hesitate to join me on this journey!

Subscribe to my YouTube channel:
Рекомендации по теме
Комментарии
Автор

I am getting the error "xpathExpr cannot be resolved to a variable" when I try to type the line:
List<DomText> items =
It does not highlight xpathExpr: the way it does in the video. Does anyone else have this problem?

jedibeslaar
Автор

Hello, if we are set isJavaScriptEnabled = false and a javaScript Method forcing when click to a button like <button onclick=function() /> so it wont work right ?
Idk i never connected a single website when javascriptEnabled = true, always throw an specific error every website

Nick-cxrs
Автор

Hello Random Code! I have a problem with HTMLUnit, it does NOT load the complete html, only some parts are visible. Do you know what may be happening? Do I need to add something?Thank you and I hope an answer. Regards!

josele
Автор

what if you wanted to specify a specific html class?

imbabywild
Автор

Hi, in The import part what libraries do you use? You can expand or pass me what you have in import... Please

marioivan
Автор

hi thanks for tutorial, i have any questions, why my console say is denied if i printing the title of web

catcherizor
Автор

hi thanks for the video
can i download files from website with Jsoup or htmlunit library
i have a website that contains a lot of pdf files and when i click on document title it open the windows explorer window to select the place to save the file
i want to download all these files with Jsoup or htmlUnit
also this website need a captcha verification before login
thanks a lot

abdelhakbekheitia
Автор

how can i install HtmlUnit? I downloaded it already but don't understand how install it

МишаДжонов
welcome to shbcf.ru