I have two lists. One has the urls and the other the filenames. The filename should change with the for loop for each video. I get the following error:
open(f'{k[1:]}.mp4', 'wb').write(r.content) ,
FileNotFoundError: [Errno 2] No such file or directory: '10560.mp4'
def download_cdn():
links = get_cdn_link()
file_name = get_link()
for i in links:
for k in file_name:
r = requests.get(i, allow_redirects=True)
open(f'{k[1:]}.mp4', 'wb').write(r.content)
file_name = ['/yxz/10560', '/yxz/10561', '/yxz/10562', '/yxz/10578', '/asd/10565', '/asd/10564']