I am trying to download files from a website. The URL is in HTML of the page, I am able to find the right one, but the various videos are in different frame per second (fps). I had multiple try functions as seen here but it was difficult to follow, so I tried the loop function seen here.
This is what I have:
import re
for [j] in range(23,24,25,26,27,28,29,30,31):
try:
result = re.search('"width":1280,"mime":"video/mp4","fps":[j],"url":(.*),', s)
extractedword=result.group(1)
commapos=extractedword.find(",")
link=extractedword[:commapos].replace('"',"")
except:
pass
print(title)
print(link)
The output message states range expected at most 3 arguments, got 9
Any advice how I can search for the correct URL? I've been trying to get this done for days. Thank you!
EDIT: I should add the URL for one title only exists in one FPS at the set resolution. The various titles exist in a variety of FPS, but each title is only available in one FPS for the required resolution. Some of the solutions are returned "download error retrying" in a loop.