Udemy-dl: Not downloading

Created on 18 Sep 2019  路  6Comments  路  Source: r0oth3x49/udemy-dl

Describe the bug
logs in successfully but after loading course info I get this for all videos and no download happens:
[] : Downloading (021 Conclusion)
[
] : Lecture : '021 Conclusion' (download skipped).
[-] : Reason : __enter__

To Reproduce
python3 udemy-dl.py https://www.udemy.com/course/creating-a-node-based-editor-in-unity-3d/

Expected behavior
It should download the videos, when I try with --save argument, the txt file gets the correct link for the video, I should be able to make a script to download them all with the txt file, but it annoys me having to do that when this should be working

Screenshots
image

Python Environment (please complete the following information):
macos high sierra
Python 3.7.3

Additional context
Thanks for doing this... when I get home I'll try on my pc to see if it works

Most helpful comment

I decided to debug it and found this error on the requests.get result, it was returning AttributeError with enter on the message, so I found this issue and installed requests==2.22.0 and it fixed the problem.

you should update the requirements.txt to this:

requests[security]
six
colorama
requests==2.22.0
unidecode
pyOpenSSL

I have never specified any specific version because any one can run the upgrade command against it and it will get the latest version available in repo. so basically the issue was with you requests not the tool, so i 'm closing the issue.

--upgrade command would have worked as well for requirements.txt instead of adding a specific

All 6 comments

I just tried with cookies, didn't work either

In case someone else is having this problem, this should work to save the videos from the txt file

import urllib.request

with open("course_name.txt") as f:
    count = 0
    for file in f.readlines():
        url = file.replace("\n", "")
        print(url)
        if ".mp4" in url:
            urllib.request.urlretrieve(url, 'video_%d.mp4' % count)
            count += 1

Also, it would be nice to have a json output for the --save argument so we can have details from the file like chapter/lesson and other stuff

didn麓t work on my pc either
Windows 10
python 3.7.2

I decided to debug it and found this error on the requests.get result, it was returning AttributeError with __enter__ on the message, so I found this issue and installed requests==2.22.0 and it fixed the problem.

you should update the requirements.txt to this:

requests[security]
six
colorama
requests==2.22.0
unidecode
pyOpenSSL

I decided to debug it and found this error on the requests.get result, it was returning AttributeError with enter on the message, so I found this issue and installed requests==2.22.0 and it fixed the problem.

you should update the requirements.txt to this:

requests[security]
six
colorama
requests==2.22.0
unidecode
pyOpenSSL

I have never specified any specific version because any one can run the upgrade command against it and it will get the latest version available in repo. so basically the issue was with you requests not the tool, so i 'm closing the issue.

--upgrade command would have worked as well for requirements.txt instead of adding a specific

Was this page helpful?
0 / 5 - 0 ratings