Last active
December 12, 2018 23:25
-
-
Save zacbrac/4a007e96510a2d81173d to your computer and use it in GitHub Desktop.
Web Scraping with Python
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
from bs4 import BeautifulSoup | |
import urllib3 | |
http = urllib3.PoolManager() | |
r = http.request('GET', 'https://www.wsj.com/news/technology') | |
soup = BeautifulSoup(r.data, 'html.parser') | |
for element in soup.select('h3.wsj-headline'): | |
print(element.get_text().encode('utf-8').strip()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment