<jupyter_start><jupyter_text>website --https://www.imdb.com/india/top-rated-indian-movies/<jupyter_code># we firstly send request to the server.
from bs4 import BeautifulSoup
import requests
page=requests.get('https://www.imdb.com/india/top-rated-indian-movies/')
page
soup= BeautifulSoup(page.content)
soup
## Here we start the scrapping.
Name=soup.find('td',class_="titleColumn")
Name
Name.text.replace('\n      ','').replace('\n','')
Name.text.replace('\n      ','').split('(')[0]

Name.text.replace('\n','')
Name.text.replace('\n      ','')


rating=soup.find('td',class_="ratingColumn imdbRating")

rating
rating.text.replace('\n','')
rating.text.split('\n')[1] #index 1
year=soup.find('span',class_="secondaryInfo")  ##<span class="secondaryInfo">(2021)</span>
year
year.text<jupyter_output><empty_output><jupyter_text>All data<jupyter_code>Name =[]     # give empty list here

for i in soup.find_all('td',class_="titleColumn"):

    i = i.get_text().replace('\n', '')

    i = i.strip(' ')
    i = i.split('(')[0]
    Name=Name[:99]
    

    Name.append(i)



Name<jupyter_output><empty_output><jupyter_text>Name =[]      give empty list herefor i in soup.find_all('td',class_="titleColumn"):    Name.append(i.text)     Name  Rating<jupyter_code>rating =[]     # give empty list here
for i in soup.find_all('td',class_="ratingColumn imdbRating"):
    rating.append(i.text.split('\n')[1])
    rating= rating[:100]

rating<jupyter_output><empty_output><jupyter_text>Year<jupyter_code>year =[]     # give empty list here
for i in soup.find_all('span',class_="secondaryInfo"):
    year.append(i.text)
    year=year[:100]

year
# print length
print(len(Name),len(rating),len(year))
# making dataframe
import pandas as pd<jupyter_output><empty_output><jupyter_text>List of 100 Indian Movies<jupyter_code>df=pd.DataFrame({'Names of 100 Movies':Name,'Rating': rating,'Year':year})

df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18181818181818182, 'fraction_numerical': 0.012539184952978056, 'mean_word_length': 5.426174496644295, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '406461', 'license': 'Apache-2.0', 'n_tokens_mistral': 726, 'n_tokens_neox': 711, 'n_words': 115, 'path': '3)Indian_imdb (1).ipynb', 'repo_name': 'benarutochan/scrapping_assignment', 'size': '1914'}