JavaScript Capable Webpage Download Tool?
coderman
coderman at protonmail.com
Fri Sep 3 09:31:48 PDT 2021
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, September 3rd, 2021 at 12:50 AM, grarpamp <grarpamp at gmail.com> wrote:
>
> Any new command line webpage downloaders capable
> of handling javascript, json, etc?
try selenium webdriver:
WebDriver driver = new ChromeDriver();
driver.get("https://en.wikipedia.org/wiki/Main_Page");
String str = driver.findElement(By.xpath("//*[@id='some-article-element-id']/p")).getText();
System.out.println(str);
note that you may just want the root document for the entire page: By.xpath("/).
you can do this in other language bindings for selenium webdriver as well.
good luck! best regards,
-----BEGIN PGP SIGNATURE-----
iNUEAREKAH0WIQRBwSuMMH1+IZiqV4FlqEfnwrk4DAUCYTJNyF8UgAAAAAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NDFD
MTJCOEMzMDdEN0UyMTk4QUE1NzgxNjVBODQ3RTdDMkI5MzgwQwAKCRBlqEfnwrk4
DNMqAP0RFp2WOhkxwtmKX42tpnHj5YfzoFoX+26RL/aygPQrJgEAjWq897obRxEn
ef/xP1ocqURUfuTmTSXRruqRpxsC+Aw=
=6mdz
-----END PGP SIGNATURE-----
More information about the cypherpunks
mailing list