Created
March 19, 2017 15:23
-
-
Save y1n0/daaf129add44c4f41dc1c11196309e3d 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
| from bs4 import BeautifulSoup | |
| import requests | |
| soup = BeautifulSoup(requests.get('http://nytimes.com').content, 'html.parser') | |
| for i in soup(class_='story-heading'): | |
| print(i.text.strip()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment