Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib2.HTTPError: HTTP Error 404: Not Found #34

Closed
mr-nano opened this issue Aug 28, 2013 · 9 comments
Closed

urllib2.HTTPError: HTTP Error 404: Not Found #34

mr-nano opened this issue Aug 28, 2013 · 9 comments

Comments

@mr-nano
Copy link

mr-nano commented Aug 28, 2013

When I try to login I get the following error

Modern Computer@ModernComputer ~/edx-downloader
$ python edx-dl.py dhruvkapur91@gmail.com password
Traceback (most recent call last):
File "edx-dl.py", line 38, in
response = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

@shk3
Copy link
Member

shk3 commented Sep 3, 2013

What version are you using? It works well on my computer.

@ghost
Copy link

ghost commented Sep 7, 2013

Same error for me : )

@shk3
Copy link
Member

shk3 commented Sep 7, 2013

@fcervigni and @dhruvkapur91 , what version are you using?

@ghost
Copy link

ghost commented Sep 7, 2013

Hi shk3,

Sorry, I should have added the context in the first place. [ I am using Mac OSX 10.8.4 and Python 2.7.2. ]

I have actually realized that when I cloned the repository, today, I did not get the master. I had, instead, the commit 620a67c , back from Date: Fri Oct 26 16:57:29 2012 +0200

I now have manually downloaded the master, and it works. THANKS FOR NOW anyways @shk3 , nice script and UI :D

I might investigate better the reason for this tomorrow.

Maybe this might be the same problem encountered by @dhruvkapur91 ?

@ghost
Copy link

ghost commented Sep 7, 2013

Ok, I had originally downloaded another project ( github.com/emadshaaban92/edx-downloader ) that is a fork of this, and which is not updated since 2012 and gives that error.

Why ?

Because it was linked in this Q&A that came 1st searching "edx download all lectures" on google :

http://www.quora.com/edX/What-are-some-easier-ways-to-download-lectures-on-edX

Thanks for your time @shk3, and @dhruvkapur91 please clone this project.

@mr-nano
Copy link
Author

mr-nano commented Sep 7, 2013

I am using Python 2.7.3 and cygwin

This still doesn't solve the problem for me.

I did the following again-
$ git clone https://github.com/emadshaaban92/edx-downloader

$ python edx-dl.py dhruvkapur91@gmail.com password
Traceback (most recent call last):
File "edx-dl.py", line 38, in
response = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

Please help

@shk3
Copy link
Member

shk3 commented Sep 7, 2013

Thank @fcervigni for letting us know the reason. @dhruvkapur91 , please clone the project at https://github.com/shk3/edx-downloader.

@shk3
Copy link
Member

shk3 commented Sep 7, 2013

@emadshaaban92 , is it possible to make a notice on your working copy to prevent users from using the old version?

@mr-nano
Copy link
Author

mr-nano commented Sep 8, 2013

@shk3 Thanks. This finally works :D

@mr-nano mr-nano closed this as completed Sep 8, 2013
balta2ar pushed a commit to balta2ar/edx-dl that referenced this issue Sep 24, 2015
yiwenlu66 added a commit to yiwenlu66/edx-dl that referenced this issue Jan 19, 2017
Xuetangx has some malformed HTMLs, like this:

<a href=&coursera-dl#34; /c4x/TsinghuaX/70250023X/asset/LST0-1-0___________.zip&coursera-dl#34;>一个有趣应用-动画文件</a></pre><p></p></o1>

in http://www.xuetangx.com/courses/course-v1:TsinghuaX+70250023X_2015_2+sp/courseware/bfbdec0177a7466d9b6bc48c011ee401/63a0945fa22d486fa4e6976802f1f037/

from which the extracted url is 'http://www.xuetangx.com /c4x/TsinghuaX/70250023X/asset/LST0-1-0___________.zip',
and it's necessary to remove the space.
yiwenlu66 added a commit to yiwenlu66/edx-dl that referenced this issue Feb 16, 2019
Xuetangx has some malformed HTMLs, like this:

<a href=&coursera-dl#34; /c4x/TsinghuaX/70250023X/asset/LST0-1-0___________.zip&coursera-dl#34;>一个有趣应用-动画文件</a></pre><p></p></o1>

in http://www.xuetangx.com/courses/course-v1:TsinghuaX+70250023X_2015_2+sp/courseware/bfbdec0177a7466d9b6bc48c011ee401/63a0945fa22d486fa4e6976802f1f037/

from which the extracted url is 'http://www.xuetangx.com /c4x/TsinghuaX/70250023X/asset/LST0-1-0___________.zip',
and it's necessary to remove the space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants