Skip to content

Instantly share code, notes, and snippets.

@kjaymiller
Created July 29, 2019 21:03
Show Gist options
  • Save kjaymiller/8a7967a9220841045631e9fdef71e447 to your computer and use it in GitHub Desktop.
Save kjaymiller/8a7967a9220841045631e9fdef71e447 to your computer and use it in GitHub Desktop.
Shownoter - Get Title by URL
from requests_html import HTMLSession
import sys
url = sys.argv[1]
session = HTMLSession().get(url, verify=False)
session.html.render()
sys.stdout.write(session.html.find('title', first=True).text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment