Created
April 25, 2017 18:13
-
-
Save stephepush/d8b36851975219ba6c255c83b61fd66b to your computer and use it in GitHub Desktop.
This file contains hidden or 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