Urllib2.htttperror: http fehler 410: wegPython

Python-Programme
Anonymous
 Urllib2.htttperror: http fehler 410: weg

Post by Anonymous »

Ich habe das folgende Programm in Python für die Tweet -Suche in Python geschrieben: < /p>

#Importing the modules
import urllib2
import json

screen_name = "wordpress"

url = "https://api.twitter.com/1/statuses/user ... reen_name=" + screen_name

data = json.load(urllib2.urlopen(url))

print len(data), "tweets"

for tweet in data:
print tweet['text']
< /code>

Aber ich habe die folgenden Fehler bekommen. Ich bin relativ neu in Python. < /P>

File "twitter.py", line 9, in
data = json.load(urllib2.urlopen(url))
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone
< /code>

Bitte helfen Sie. < /p>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post