<jupyter_start><jupyter_text><jupyter_code>!pip install selenium
!apt-get update # to update ubuntu to correctly run apt install
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
#https://www.selenium.dev/selenium/docs/api/py/_modules/selenium/webdriver/chrome/webdriver.html  ---- > Source code of selinum driver.
import sys
sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver')
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
wd = webdriver.Chrome('/usr/lib/chromium-browser/chromedriver',options = chrome_options)
wd.get("https://google.com/")
search_field = wd.find_element_by_name("q")
search_field.send_keys("<NAME>")
search_field.submit()
lists= wd.find_elements_by_class_name("r")
print ("Found " + str(len(lists)) + " searches:")
i=0
for listitem in lists:
   print (listitem.get_attribute("innerHTML"))
   i=i+1
   if(i>10):
      break
wd.quit()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14872262773722628, 'fraction_numerical': 0.004562043795620438, 'mean_word_length': 6.077419354838709, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '322659', 'license': 'MIT', 'n_tokens_mistral': 400, 'n_tokens_neox': 376, 'n_words': 62, 'path': 'Selenium-1.ipynb', 'repo_name': 'peter-nani/Python-1', 'size': '1128'}