mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-30 15:14:14 +01:00
Get the url as a argument and not hardcode it..
This commit is contained in:
parent
cd8b995565
commit
2c3bc7293e
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import re,urllib2,urllib,os,subprocess
|
import re,urllib2,urllib,sys,os,subprocess
|
||||||
def getdata(url):
|
def getdata(url):
|
||||||
request = urllib2.Request(url)
|
request = urllib2.Request(url)
|
||||||
request.add_header = [('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')]
|
request.add_header = [('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')]
|
||||||
@ -8,7 +8,8 @@ def getdata(url):
|
|||||||
response.close();
|
response.close();
|
||||||
return data
|
return data
|
||||||
|
|
||||||
text = getdata("http://svtplay.se/t/103466/dokument_inifran")
|
argv = sys.argv[1]
|
||||||
|
text = getdata(argv)
|
||||||
m = re.search('dynamicStreams=(.*)\&\;background', text)
|
m = re.search('dynamicStreams=(.*)\&\;background', text)
|
||||||
new = m.group(1)
|
new = m.group(1)
|
||||||
tmp = new.split("|")
|
tmp = new.split("|")
|
||||||
|
Loading…
Reference in New Issue
Block a user