<jupyter_start><jupyter_text><jupyter_code>from bs4 import BeautifulSoup
import requests
url='https://en.wikipedia.org/wiki/Web_scraping'
response=requests.get(url) # we are sending request to the url and taking the response 
response
response.text
#parsing library - html parser and second is lxml is a package
soup=BeautifulSoup(response.text,"lxml")
soup
for Alink in soup.find_all('a'):
  #print(Alink) # a is tag
  print(Alink.get('href'))
for ptag in soup.find_all('p'):
  #print(ptag) 
  #now second loop for b tag
  for btag in ptag.find_all('b'):
    print(btag.text)
import pandas as pd
list1=[1,'ram',3]
list2=[3,'shyam',5]
list3=[5,'mohan',7]
df=pd.DataFrame([list1,list2,list3],columns=['age','name','marks'])
'''''''''''''''''''''

df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17095115681233933, 'fraction_numerical': 0.016709511568123392, 'mean_word_length': 6.419047619047619, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '582708', 'license': 'MIT', 'n_tokens_mistral': 300, 'n_tokens_neox': 294, 'n_words': 68, 'path': 'beautifulSoup.ipynb', 'repo_name': 'uzmakhan7/uk', 'size': '778'}