Created
December 2, 2015 00:14
-
-
Save jtg567/17989f5b4bd9e0b87e2d to your computer and use it in GitHub Desktop.
Scrape token-id from periscope.com with python (lxml and request)
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 lxml import html | |
import requests | |
#scrape periscope desktop page; meta tag token-id content is empty when not streaming | |
page = requests.get('https://www.periscope.tv/<replace username>') | |
tree = html.fromstring(page.content) | |
air_status = tree.xpath('//*[@id="token-id"]/@content') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment