Guest User

drachenstealer.py

a guest
Jul 15th, 2016
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. #!/usr/bin/python3
  2. # coding=utf-8
  3.  
  4. import requests, os, json, sys, datetime
  5.  
  6.  
  7. def main(args):
  8.     apidata = json.loads(requests.get("https://www.younow.com/php/api/broadcast/info/curId=0/user=Drache_Offiziell").text)
  9.  
  10.     if 'media' in apidata.keys():
  11.         url = 'rtmp://' + apidata['media']['host'] + apidata['media']['app'] + '/' + apidata['media']['stream']
  12.         os.system('rtmpdump -r "%s" > streams/drachenstream%s.flv' % (url,
  13.             datetime.datetime.now().strftime("%d%m%Y-%H%M%S")))
  14.     else:
  15.         print("Drache offline")
  16.  
  17.    
  18.  
  19. if __name__ == "__main__":
  20.     main(sys.argv)
Add Comment
Please, Sign In to add comment