pexea12

Download video from dailymotion

Aug 15th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. file = open('test.txt').read()
  2. str = file[file.find('config'):file.find('type="application')]
  3.  
  4. import urllib.parse
  5.  
  6. str = urllib.parse.unquote(str)
  7.  
  8. str = str[7:str.find('&externalInterface=dmpOnFlashEvent')]
  9.  
  10. import json
  11.  
  12. data = json.loads(str)
  13.  
  14. link = data['metadata']['qualities']['720'][0]['url']
  15.  
  16. open('link.txt', 'a+').write(link + '\n')
Add Comment
Please, Sign In to add comment