|
@@ -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
|
|