Browse Source

filmix pauze

Ivars 6 years ago
parent
commit
fa813dd7fb
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      sources/filmix.py

+ 8
- 1
sources/filmix.py View File

368
         if not r:
368
         if not r:
369
             raise Exception("Can not get movie info")
369
             raise Exception("Can not get movie info")
370
             #return []
370
             #return []
371
-        js = json.loads(r)
371
+        if r.startswith("<html>"):
372
+            import time
373
+            time.sleep(0.1)
374
+            r = util.post("https://filmix.co/api/movies/player_data", data=post_data, headers = headers)
375
+        try:
376
+            js = json.loads(r)
377
+        except Exception as e:
378
+            raise Exception("Can not get movie info")
372
         return js
379
         return js
373
 
380
 
374
     def decode_base64(self, encoded_url):
381
     def decode_base64(self, encoded_url):