Created
December 2, 2015 00:14
-
-
Save jtg567/17989f5b4bd9e0b87e2d to your computer and use it in GitHub Desktop.
Revisions
-
jtg567 created this gist
Dec 2, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ 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')