<jupyter_start><jupyter_text>Webscrapping<jupyter_code>import bs4
from urllib.request import urlopen as uReq
from urllib.request import Request
from bs4 import BeautifulSoup as soup
my_url = 'https://www.newegg.com/Laptops-Notebooks/Category/ID-223'
uClint = uReq(my_url)
page_html = uClint.read()
page_html.close()
page_soup = soup(page.html, "html.parser")
page_soup
page_soup.h1
page_soup.p
container = page_soup.find_all("div", { "class" : "item-container"})
container
len(container)
contain = container[0]
contain
contain.img['title']<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12302284710017575, 'fraction_numerical': 0.012302284710017574, 'mean_word_length': 7.260869565217392, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '291960', 'license': 'Unlicense', 'n_tokens_mistral': 226, 'n_tokens_neox': 220, 'n_words': 41, 'path': 'Class Work/Class - 6 Webscrapping.ipynb', 'repo_name': 'shkhaider2015/PIAIC-QUARTER-2', 'size': '569'}