-
-
Save stephepush/bfd2505d214e3572000e0d78b5a6dfa6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bs4 | |
from urllib.request import urlopen as uReq | |
from bs4 import BeautifulSoup as soup | |
my_url = 'https://site.com' | |
#opening up connection, grabbing the page | |
uClient = uReq(my_url) | |
page_html = uClient.read() | |
uClient.close() | |
#html parsing | |
page_soup = soup(page_html, "html.parser") | |
#grabs each group | |
items = page_soup.findAll("div", {"class":"group"}) | |
len(items) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment