Advertisement
Guest User

vkdownloader version 2 by p0pc0rn

a guest
Nov 19th, 2012
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.41 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import sys, re, urllib2
  4.  
  5.  
  6. if len(sys.argv) < 2:
  7.     print """    
  8. ## Usage : python vkdownloader_v2.py "Url" ##
  9. -------------------------------------------------------------------------------------------
  10. Example :
  11. python vkdownloader_v2.py "http://vk.com/video_ext.php?oid=1111111&id=2222222&hash=4333333"
  12. -------------------------------------------------------------------------------------------
  13. ## VK Downloader V2 by p0pc0rn 2012 ##
  14.  
  15.          
  16.    
  17.          """
  18.     sys.exit(0)
  19.  
  20. url = sys.argv[1]
  21. url2 = sys.argv[1]
  22. url3 = sys.argv[1]
  23.  
  24. find = re.compile("var video_host = '(.*?)';")
  25. find2 = re.compile("var video_uid = '(.*?)';")
  26. find3 = re.compile("var video_vtag = '(.*?)';")
  27. data = urllib2.urlopen(url).read()
  28. data2 = urllib2.urlopen(url2).read()
  29. data3 = urllib2.urlopen(url3).read()
  30. result = find.search(data)
  31. str = result.group(1)
  32. data2 = urllib2.urlopen(url2).read()
  33. data3 = urllib2.urlopen(url3).read()
  34. result2 = find2.search(data2)
  35. result3 = find3.search(data3)
  36.  
  37. print 'Download link for 360p => ' + str.replace("userapi.com", "vk.com") +'u'+result2.group(1)+'/videos/'+ result3.group(1)+'.360.mp4'
  38. print 'Download link for 360p => ' + str.replace("userapi.com", "vk.com") +'u'+result2.group(1)+'/videos/'+ result3.group(1)+'.480.mp4'
  39. 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