Add Minus download URL resolving tool
parent
114c47eaca
commit
7c1e8dc9a7
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys, urllib2, re
|
||||
|
||||
contents = urllib2.urlopen(sys.argv[1]).read()
|
||||
|
||||
data = re.search('"name": ?"([^"]+)", "', contents)
|
||||
filename = data.group(1)
|
||||
|
||||
data = re.search('"secure_prefix": ?"([^"]+)"', contents)
|
||||
secure_prefix = data.group(1)
|
||||
|
||||
data = re.search('"id": ?"([^"]+)"', contents)
|
||||
link_id = data.group(1)
|
||||
|
||||
url = "http://i.minus.com%s/d%s/%s" % (secure_prefix, link_id, filename)
|
||||
|
||||
print url
|
Loading…
Reference in New Issue