Okay so I am learning Web Scraping and am comfortable with Java hence I choose Jsoup, which is a web scraping library. I planned on scraping A CodeChef contest problem (which is just a coding problem), but I found difficulty scraping all the displayed content, which is not possible as most of it is dynamic source. So I used selenium to render the JavaScript and obtain simple HTML page and then feed it to JSOUP.
So I tried printing the rendered HTML page just to verify, but I get the following error when I run the code:
My Code:
File f = new File("<Path to chromedriver.exe>");
System.setProperty("webdriver.chrome.driver", f.getAbsolutePath());
WebDriver driver = new ChromeDriver();
driver.get("https://www.codechef.com/problems/FRGTNLNG");
System.out.println(driver.getPageSource());
Error (in chrome):
You are using an unsupported command-line flag: --ignore-certifcate-errors. Stability and security will suffer
I tried the following solution from Chrome Error: You are using an unsupported command-line flag: --ignore-certifcate-errors. Stability and security will suffer, I installed the latest chromedriver but it didn't resolve my error.
I also tried adding Desired Capabilities (now deprecated) and ChromeOptions as per Pass driver ChromeOptions and DesiredCapabilities?, but the same error persists.
Thanks in advance!