Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests , os , tqdm
- #CMD : pip install tqdm
- URL = input("URL please : ")
- fileNameOutput = input("Output FileName : ")
- r = requests.get(URL)
- def toArray(STR):
- out = []
- buff = []
- for c in STR:
- if c == '\n':
- out.append(''.join(buff))
- buff = []
- else:
- buff.append(c)
- else:
- if buff:
- out.append(''.join(buff))
- return out
- StrtoArray = toArray(r.text)
- urls = []
- for x in StrtoArray:
- if ".ts" in x:
- urls.append(x)
- for x in tqdm.tqdm(urls, ncols= 70):
- os.system('curl -s http://website.com/{} >> {}.mp4'.format(x,fileNameOutput.replace(" ", "_")))
- print('')
Add Comment
Please, Sign In to add comment