<jupyter_start><jupyter_text>Jupyter or Colab, we need to ```pip install selenium```<jupyter_code>pip install selenium<jupyter_output><empty_output><jupyter_text>Jupyter or Colab, we need to ```pip install icecream```<jupyter_code>pip install icecream<jupyter_output><empty_output><jupyter_text>For Jupyter, we would [download the correct WebDriver](https://chromedriver.storage.googleapis.com/index.html?path=94.0.4606.41/) and place in folder next to our notebook. For Colab, we ```pip install kora -q``` to serve as the driver.<jupyter_code># pip install kora -q

#import selenium related features

from selenium import webdriver ## in Jupyter, we access the driver
from selenium.webdriver.common.keys import Keys ## automate pressing keys
from selenium.webdriver.support.ui import Select ## automate selecting menu items
from selenium.webdriver.support.ui import WebDriverWait ## automate pausing
from selenium.webdriver.common.by import By ## search for classes, IDs, tags, etc.
from selenium.webdriver.support import expected_conditions as EC ## look for a condition
from selenium.webdriver.common.action_chains import ActionChains ## chaining actions
from selenium.webdriver.support.select import Select ## more and more methods

## the usual libraries and packages
import requests ## make requests with sites
import time ## time to pause
from bs4 import BeautifulSoup ## for parsing html
import pandas as pd ## for organizing data
import datetime ## timestamp
from icecream import ic ## debugging. no need for pip install icecream
## NEED FOR COLAB 
# from kora.selenium import wd as driver ## import from kora to be web driver
 ## NEED FOR JUPYTER NOTEBOOK - turn off for Colab
 ## Access chromedriver
# driver = webdriver.Chrome('./chromedriver') ## access chrome driver<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08287292817679558, 'fraction_numerical': 0.0055248618784530384, 'mean_word_length': 5.757462686567164, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '250750', 'license': 'MIT', 'n_tokens_mistral': 552, 'n_tokens_neox': 505, 'n_words': 196, 'path': 'advanced scraping workshops/week_4_and_5_B_hate_tracker_BLANK.ipynb', 'repo_name': 'sandeepmj/fall21-students-practical-python', 'size': '1810'}