Skip to content

Instantly share code, notes, and snippets.

@hamletbatista
Last active November 3, 2019 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamletbatista/ff70ac7447858fc0b841fdd91749532a to your computer and use it in GitHub Desktop.
Save hamletbatista/ff70ac7447858fc0b841fdd91749532a to your computer and use it in GitHub Desktop.
#Please type: !pip install requests-html
from requests_html import HTMLSession
session = HTMLSession()
url = "https://www.searchenginejournal.com/uncover-powerful-data-stories-python/328471/"
with session.get(url) as r:
selector="#post-328471 > div:nth-child(2) > div > div > div.sej-article-content.gototop-pos"
post = r.html.find(selector, first=True)
text = post.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment