v.1.1.1 Cam4 Remote 24/7 Anonymous STREAMLINK Recorder for Python27

This commit is contained in:
horacio9a 2021-04-25 08:06:09 +02:00 committed by GitHub
parent 8e86bf12d5
commit 7c5bb312f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,12 +19,11 @@ if __name__=='__main__':
import sys
model = sys.argv[1]
url ='https://www.cam4.com/{}'.format(model)
user_agent = {'user-agent': 'Mozilla/5.0 (Android; Mobile; rv:14.0) ..'}
http = urllib3.PoolManager(10, headers=user_agent)
r = http.urlopen('GET',url)
url ='https://www.cam4.com/{}/'.format(model)
manager = PoolManager(10)
r = manager.request('GET', url)
enc = (r.data)
dec=urllib.unquote(enc).decode()
dec=urllib.unquote(enc)
if 'showState' in dec:
status0 = dec.split("showState: '")[1]