Skip to content

Instantly share code, notes, and snippets.

@rostyq
Created August 1, 2017 14:30
Show Gist options
  • Save rostyq/7dc20843a3cb24a86e2a61727e90df4b to your computer and use it in GitHub Desktop.
Save rostyq/7dc20843a3cb24a86e2a61727e90df4b to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup as bs
url = "https://www.vanityfair.com/style/society/2014/06/monica-lewinsky-humiliation-culture"
# get page and make soup for parsing
soup = bs(requests.get(url).text, "html5lib")
# select all tag p in tag section
article = soup.select('section p')
for i in article:
print(i.text, end='\n\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment