Ivars 6 lat temu
rodzic
commit
a52ee73681
2 zmienionych plików z 12 dodań i 16 usunięć
  1. 5
    5
      Downloader.py
  2. 7
    11
      project.wpr

+ 5
- 5
Downloader.py Wyświetl plik

@@ -252,7 +252,7 @@ def stop():
252 252
 
253 253
 ###############################################
254 254
 
255
-def download_video_file(url,output,headers=None):
255
+def download_video_file(url,outputfile,headers=None):
256 256
     #output = stream["name"].replace("\\"," ").replace(":"," ").replace("|"," ")
257 257
     if not headers:
258 258
         headers = {"user-agent":"Enigma2"}
@@ -264,9 +264,9 @@ def download_video_file(url,output,headers=None):
264 264
         ext,stream_type = (".ts","hls")
265 265
     output = output+ext
266 266
     if stream_type == "hls":
267
-        d = DownloadWithProgressFragmented(url,output,headers={"user-agent":"Enigma2"})
267
+        d = DownloadWithProgressFragmented(url, outputfile, headers={"user-agent":"Enigma2"})
268 268
     else:
269
-        d = DownloadWithProgress(url,output,headers={"user-agent":"Enigma2"})
269
+        d = DownloadWithProgress(url, outputfile, headers={"user-agent":"Enigma2"})
270 270
     d.addProgress(print_progress)
271 271
     d.start().addCallback(download_ok).addErrback(download_err)
272 272
     return d
@@ -279,7 +279,7 @@ if __name__ == "__main__":
279 279
     else:
280 280
         url = url2 = "http://walterebert.com/_/playground/videos/sintel-trailer.m3u8"
281 281
         url = "http://str5e.lattelecom.tv/mobile-vod/mp4:sv_ka_sapni_lv_hq.mp4/playlist.m3u8?resource_id=like_a_dream&auth_token=ISVlUKAuwHJEFFKlHQ9e/GVIoKExOwcu0ymn2AEyeOhn2BAwzmy+csGxUe9MeKooEdjS+xJfmP6XPCuqlZIpe4k/UfGAwn0BQ/chunklist_w1465619955.m3u8?resource_id=like_a_dream&auth_token=ISVlUKAuwHJEFFKlHQ9e%2FGVIoKExOwcu0ymn2AEyeOhn2BAwzmy+csGxUe9MeKooEdjS+xJfmP6XPCuqlZIpe4k%2FUfGAwn0BQ%2FuGk9oBsD4%3D"
282
-        output = "tmp\\test"
282
+        outputfile = "tmp\\test"
283 283
         #url = "https://r3---sn-bavc5ajvh-gpme.googlevideo.com/videoplayback?key=yt6&mime=video%2Fmp4&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&expire=1490986184&lmt=1490940183963773&dur=1302.639&itag=18&ratebypass=yes&mm=31&requiressl=yes&ipbits=0&upn=azFGj8gY02w&ip=85.254.87.15&pl=23&ei=aFDeWLzqDcn-dLC_gdAM&signature=083F353AC09CD98A70AD7D9438DD3C91C781166B.715456B9C35F040BDC4728CA76A0D1779B684A90&source=youtube&mv=m&mt=1490964451&ms=au&mn=sn-bavc5ajvh-gpme&gir=yes&clen=73596250&id=o-AGH9y-hWn1MtW1VzCyI_8XYYEWODsTDBZbfagQH3BrfQ&initcwndbps=4493750"
284 284
         #url = "http://techslides.com/demos/sample-videos/small.mp4"
285 285
         #url = "http://wx17.poiuytrew.pw/s/c507282042b1bf25e0b72c34a68426f3/hd_30/Jackie.2016.D.iTunes.BDRip.1080p_720.mp4"
@@ -287,7 +287,7 @@ if __name__ == "__main__":
287 287
         #url = "http://vod-hls-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_hd/a3e90e-b08ktytr/vf_b08ktytr_f9d55583-afc7-49bb-9bf4-d8f1ac99f56f.ism.hlsv2.ism/vf_b08ktytr_f9d55583-afc7-49bb-9bf4-d8f1ac99f56f.ism.hlsv2-audio=128000-video=5070000.m3u8"
288 288
         #url = "https://58174450afee9.streamlock.net/vod/mp4:_definst_/f/e/8e49fc32.mp4/playlist.m3u8?safwerwfasendtime=1490877870&safwerwfasstarttime=1490859339&safwerwfashash=hS2FfVZysQVazBQ6RJn1IhUevBkKxIF09Ly3BjfT43U="
289 289
     active = 2
290
-    d1 = download_video_file(url,output)
290
+    d1 = download_video_file(url,outputfile)
291 291
     reactor.run()
292 292
 
293 293
 

+ 7
- 11
project.wpr Wyświetl plik

@@ -155,10 +155,6 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
155 155
                None,
156 156
                1,
157 157
                0),
158
-        945L: (0,
159
-               None,
160
-               1,
161
-               0),
162 158
         957L: (0,
163 159
                None,
164 160
                1,
@@ -1483,9 +1479,9 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1483 1479
                               (loc('sources/ltc.py'),
1484 1480
                                {'attrib-starts': [('Source',
1485 1481
         26),
1486
-        ('Source.get_content',
1487
-         78)],
1488
-                                'first-line': 436L,
1482
+        ('Source.get_info2',
1483
+         930)],
1484
+                                'first-line': 934L,
1489 1485
                                 'folded-linenos': [132L,
1490 1486
         161L,
1491 1487
         221L,
@@ -1499,10 +1495,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1499 1495
         399L,
1500 1496
         412L,
1501 1497
         532L],
1502
-                                'sel-line': 440L,
1503
-                                'sel-line-start': 26975L,
1504
-                                'selection_end': 27009L,
1505
-                                'selection_start': 27009L,
1498
+                                'sel-line': 944L,
1499
+                                'sel-line-start': 48949L,
1500
+                                'selection_end': 48949L,
1501
+                                'selection_start': 48949L,
1506 1502
                                 'zoom': 0L}),
1507 1503
                               (loc('sources/replay.py'),
1508 1504
                                {'attrib-starts': [('Source',