kallqvist / skillshare-downloader

MIT License
313 stars 105 forks source link

Error - Exception: Failed to fetch video meta #22

Closed jzastoupil closed 5 years ago

jzastoupil commented 5 years ago

I have used skillshare-downloader for a number of courses to be able to watch them off line but today I ran across an issue I haven't seen before. I am attempting to download a course that has over 200 videos and on video 134, I get the following:

Traceback (most recent call last):

File "", line 1, in runfile('L:/downloaded/dl/skillshare-downloader-master/code/SkillshareDownload.py', wdir='L:/downloaded/dl/skillshare-downloader-master/code')

File "P:\Users\Jess\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile execfile(filename, namespace)

File "P:\Users\Jess\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "L:/downloaded/dl/skillshare-downloader-master/code/SkillshareDownload.py", line 10, in dl.download_course_by_url("https://www.skillshare.com/classes/BECOME-A-GREAT-SINGER-Your-Complete-Vocal-Training-System/1213366843?via=search-layout-grid")

File "L:\downloaded\dl\skillshare-downloader-master\code\downloader.py", line 36, in download_course_by_url self.download_course_by_class_id(m.group(1))

File "L:\downloaded\dl\skillshare-downloader-master\code\downloader.py", line 108, in download_course_by_class_id video_id=video_id,

File "L:\downloaded\dl\skillshare-downloader-master\code\downloader.py", line 145, in download_video raise Exception('Failed to fetch video meta')

Exception: Failed to fetch video meta

jzastoupil commented 5 years ago

I just received the same error on the very first video of a 4 video course....so it doesn't have to do with the course length

kallqvist commented 5 years ago

Hey, this can probably happen for a bunch of different reasons but I think they all mean something like "shillshare server responded but doesn't wan't to return videos"

Most common reason is that cookie have expired, try repeat the step about copying that from your browser into the code and see if the issue remains

jzastoupil commented 5 years ago

No that's not it. I'm able to download other videos fine. I was able to go in and adjust the code to just skip the video with the issue and it's literally just the two individual videos that I got that error on that skipped. But I can play them directly in skillshare so I am not really sure why they produce the error (which come back as error 405 interestingly enough, which is usually because of a bad web page. Curious. )
I'm still new to python and this has been interesting. Thank you for your work

kallqvist commented 5 years ago

Hmm, something else to try might be to change the user-agent as well and see if that works better.

All videos are handled exactly the same in this code but for whatever reason skillshare sometimes responds differently for a few of them... Sadly I believe this is an issue I can't really do anything about since it seems to be something about skillshare servers so I'll close this issue for now.

Feel free to re-open if you happen to stumble over some new information regarding this issue!

ihrubab commented 4 years ago

I am facing this same error due to one of the videos being problematic. What do I need to change to skip that particular video or videos and download the rest?