Home 00 Dataguide 01 Github 02 Colabs 03 Shell Basics 04 Apis 05 Webscraping06 Nbdev 07 Javascript Packag... 08 Cloud Functions 09 Browser Extension

Don't Look! I'm changing!

URL Copied

Musical loops

BinderBinderBinderOpen Source Love svg3

NPM LicenseActiveGitHub last commit

GitHub starsGitHub watchersGitHub forksGitHub followers

TweetTwitter Follow

⚠️ For best experience open in colab!.⚠️

Selenium vs Puppetteer vs jsdom vs casper.ipynb

casper is missing. Very easy to use.

JSdom

const jsdom = require("jsdom"); const { JSDOM } = jsdom; JSDOM.fromURL('https://bniajfi.org', {resources: "usable"}).then(dom => { txt = dom.serialize() txt=txt.split('document.getElementById("container")')[1] console.log( txt ) });

Puppetteer

Headless Recorder Extension

Now lets write the js script and stuff it into an index.js file

! npm i -s csv-parser

Selenium

!wget https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip #!unzip chromedriver_linux64.zip -d /usr/bin/ !pip install selenium !pip install openpyxl !apt-get update !apt-get install -y unzip xvfb libxi6 libgconf-2-4 !apt-get install default-jdk