Esempio n. 1
0
 def generate_play_links(self):
     self.links = dict()
     for name, path in self.streams.paths.iteritems():
         if path is None:
             break
         encrypted_response = self.comm.send_encrypted_url_request(path)
         if self.streams.stream_type == GCparser.StreamTypes.RTMP:
             link = GCparser.parse_encrypted_url_response(self.streams.stream_type, encrypted_response)
             link = link[:link.find('?')] + '_hd' + link[link.find('?'):]
             self.links[name] = link
         elif self.streams.stream_type == GCparser.StreamTypes.LIVE:
             #TODO: Generate a m3u8 playlist
             pass
     return
Esempio n. 2
0
 def find_streams(self):
     response = self.comm.send_game_servlet_request(self.game_id)
     streams = GCparser.parse_game_servlet_response(response.read())
     self.streams = streams