kanedglsk / pydelicious

Automatically exported from code.google.com/p/pydelicious
Other
0 stars 0 forks source link

I get 404 not found erros. #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've tryied everything but can't make some methods work.

What steps will reproduce the problem?
1. import pydelicious
2. pydelicious.get_userposts('myusr')
3. pydelicious.PyDeliciousException: HTTP Error 404: Not Found

What is the expected output? What do you see instead?

I expect getting posts (get_popular works fine) but i get this exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/pydelicious-0.6-py2.6.egg/pydelicious/__init__.py", line 973, in get_userposts
    return getrss(user=user)
  File "/usr/local/lib/python2.6/dist-packages/pydelicious-0.6-py2.6.egg/pydelicious/__init__.py", line 969, in getrss
    return dlcs_rss_request(tag=tag, popular=popular, user=user, url=url)
  File "/usr/local/lib/python2.6/dist-packages/pydelicious-0.6-py2.6.egg/pydelicious/__init__.py", line 447, in dlcs_rss_request
    rss = http_request(url).read()
  File "/usr/local/lib/python2.6/dist-packages/pydelicious-0.6-py2.6.egg/pydelicious/__init__.py", line 227, in http_request
    raise PyDeliciousException, "%s" % e
pydelicious.PyDeliciousException: HTTP Error 404: Not Found

Original issue reported on code.google.com by santiago...@gmail.com on 19 Aug 2011 at 12:33

GoogleCodeExporter commented 9 years ago
Hi,

I'm not a python expert, but it looks like the feed URLs in pydelicious are all 
out of date / don't exist on the delicious website anymore. 

You'll need to update the pydelicious URLs in the __init__.py file. 

I'm going through the collective intelligence book by o'reilly. 

Changing like 447 in __init__.py to:

rss = http_request('http://feeds.delicious.com/v2/rss').read()

got rid of the error messages for me. A better solution is still needed though 
as the original code brought up tags/posts/popular/etc depending on function 
you ran, whereas this hack above isn't selecting. 

Cheers,
Chris

Original comment by chris.an...@gmail.com on 28 Oct 2011 at 1:09

GoogleCodeExporter commented 9 years ago
Same book! I'll try that. Thank you.

Original comment by santiago...@gmail.com on 28 Oct 2011 at 1:15

GoogleCodeExporter commented 9 years ago
Just change this line, and everything will work (at least for me):

File: "...\Python27\Lib\site-packages\pydelicious" (or any other python version 
you're using)
Line: 78
From: "DLCS_RSS = 'http://del.icio.us/rss/'"
To: "DLCS_RSS = 'http://feeds.delicious.com/v2/rss/'"

After that I don't get any error (at least for get_popular method).

Original comment by mattos.m...@gmail.com on 2 Nov 2011 at 5:44

GoogleCodeExporter commented 9 years ago
Just tested pydelicious.get_userposts('myusr') method and it's working too.

Original comment by mattos.m...@gmail.com on 2 Nov 2011 at 5:47