Skip to content

Instantly share code, notes, and snippets.

@hannsen
Created August 24, 2024 22:46
Show Gist options
  • Save hannsen/67b14a071830f0151879b516d3bba091 to your computer and use it in GitHub Desktop.
Save hannsen/67b14a071830f0151879b516d3bba091 to your computer and use it in GitHub Desktop.
lookmovie2 downloader, copy ts stream url from network tab
import re
import os
import urllib.request
from urllib.error import HTTPError
linki = '''
https://acdcn01.mugaznik.bond/aes/example.mp4/seg-7-v1-a1.ts
'''.strip()
x = re.search(r"S\d\d?E\d\d?", linki)
epi = x.group(0)
try:
os.mkdir(epi)
except:
pass
for i in range(1, 999):
realLink = re.sub(r"seg-\d+", "seg-" + str(i), linki)
print("seg-" + str(i))
try:
urllib.request.urlretrieve(realLink, epi + "/seg-" + str(i) + '.ts')
except HTTPError:
break
cmd = 'copy /b '
for j in range(1, i):
cmd += 'seg-' + str(j) + '.ts+'
cmd = cmd[:-1] + ' all.ts'
os.chdir(epi)
os.system(cmd)
os.system('ffmpeg -i all.ts -acodec copy -vcodec copy ' + epi + '.mp4')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment