This script returns a 404 whenever it queries a https://classtranscribe.illinois.edu/data/*.vtt url even after setting up the correct Authentication Bearer.
I'm not sure what's wrong but adding a referer header to the requests.session object fixed the error.
More precisely, I had to change this line from:
session.headers.update({'Authorization': "Bearer "+ auth})
to:
random_video_uuid = ???
random_video = f"https://classtranscribe.illinois.edu/video?id={random_video_uuid}"
session.headers.update({'Authorization': "Bearer "+ auth, 'referer': random_video})
I'm not sure where the actual bug might be but cURL'ing a video without a referer header also 404's.
This script returns a
404whenever it queries ahttps://classtranscribe.illinois.edu/data/*.vtturl even after setting up the correct Authentication Bearer.I'm not sure what's wrong but adding a
refererheader to therequests.sessionobject fixed the error.More precisely, I had to change this line from:
to:
I'm not sure where the actual bug might be but cURL'ing a video without a
refererheader also404's.