<jupyter_start><jupyter_text>1.Scrape the details of most viewed videos on YouTube from Wikipedia:<jupyter_code># Importing Libraries
import pandas as pd
from bs4 import BeautifulSoup
import requests
import selenium
from selenium import webdriver
import time
driver=webdriver.Chrome("chromedriver.exe")
driver.get("https://en.wikipedia.org/wiki/List_of_most-viewed_YouTube_videos")
rank=[]
name=[]
artist=[]
upload_date=[]
views=[]
titles_tag=driver.find_elements_by_xpath("//*[@id='mw-content-text']/div[1]/table[3]/tbody/tr/td[1]")
for i in titles_tag:
    rank.append(i.text)
rank[0:9]
titles_tag1=driver.find_elements_by_xpath("//*[@id='mw-content-text']/div[1]/table[3]/tbody/tr/td[2]/a")
for i in titles_tag1:
    name.append(i.text)
name[0:9]
titles_tag3=driver.find_elements_by_xpath("//*[@id='mw-content-text']/div[1]/table[3]/tbody/tr/td[3]/a")
for i in titles_tag3:
    artist.append(i.text)
artist[0:9]
titles_tag4=driver.find_elements_by_xpath("//*[@id='mw-content-text']/div[1]/table[3]/tbody/tr/td[5]")
for i in titles_tag4:
    upload_date.append(i.text)
upload_date[0:9]
titles_tag5=driver.find_elements_by_xpath("//*[@id='mw-content-text']/div[1]/table[3]/tbody/tr/td[4]")
for i in titles_tag5:
    views.append(i.text)
views[0:9]
import pandas as pd
YouTube=pd.DataFrame()
YouTube['Rank']=rank[0:29]
YouTube['Name']=name[0:29]
YouTube['Artist']=artist[0:29]
YouTube['Upload_Date']=upload_date[0:29]
YouTube['Views_Billions']=views[0:29]
YouTube<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18352310783657066, 'fraction_numerical': 0.033489618218352314, 'mean_word_length': 7.393258426966292, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, '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': '24895', 'license': 'Apache-2.0', 'n_tokens_mistral': 634, 'n_tokens_neox': 613, 'n_words': 84, 'path': '1 Question WEB4.ipynb', 'repo_name': 'ramyuva/WEB-4', 'size': '1493'}