Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import sys, re, urllib2
- if len(sys.argv) < 2:
- print """
- ## Usage : python vkdownloader_v2.py "Url" ##
- -------------------------------------------------------------------------------------------
- Example :
- python vkdownloader_v2.py "http://vk.com/video_ext.php?oid=1111111&id=2222222&hash=4333333"
- -------------------------------------------------------------------------------------------
- ## VK Downloader V2 by p0pc0rn 2012 ##
- """
- sys.exit(0)
- url = sys.argv[1]
- url2 = sys.argv[1]
- url3 = sys.argv[1]
- find = re.compile("var video_host = '(.*?)';")
- find2 = re.compile("var video_uid = '(.*?)';")
- find3 = re.compile("var video_vtag = '(.*?)';")
- data = urllib2.urlopen(url).read()
- data2 = urllib2.urlopen(url2).read()
- data3 = urllib2.urlopen(url3).read()
- result = find.search(data)
- str = result.group(1)
- data2 = urllib2.urlopen(url2).read()
- data3 = urllib2.urlopen(url3).read()
- result2 = find2.search(data2)
- result3 = find3.search(data3)
- print 'Download link for 360p => ' + str.replace("userapi.com", "vk.com") +'u'+result2.group(1)+'/videos/'+ result3.group(1)+'.360.mp4'
- print 'Download link for 360p => ' + str.replace("userapi.com", "vk.com") +'u'+result2.group(1)+'/videos/'+ result3.group(1)+'.480.mp4'
- print 'Download link for 360p => ' + str.replace("userapi.com", "vk.com") +'u'+result2.group(1)+'/videos/'+ result3.group(1)+'.720.mp4'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement