rjw57 / yt

Experiments with the YouTube API
MIT License
83 stars 25 forks source link

http 410 Gone #47

Open knezi opened 9 years ago

knezi commented 9 years ago

Hi, I installed yt on RasPi. Via youtube-dl I can donwload videos. When I run yt --player omxplayer, I get http error 410:

Traceback (most recent call last):
  File "/usr/local/bin/yt", line 9, in <module>
    load_entry_point('whitey==0.4', 'console_scripts', 'yt')()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 37, in main
    ui.run()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 103, in run
    curses.wrapper(self._curses_main)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 147, in _curses_main
    self._run_pager()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 221, in _run_pager
    feed = self._get_feed(idx, n_per_page)
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 188, in _get_feed
    self._last_feed = self._feed['fetch_cb'](start, count, self._ordering)
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 484, in fetch_cb
    return json.load(urllib2.urlopen('%s?%s' % (url, urllib.urlencode(query))))
  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 407, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 445, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone
blerko commented 9 years ago

It's likely that this is due to the update to the Youtube API, if you look at the issue titled "Youtube API update killed yt" before this you will see how I worked around the API change (it's not pretty). I just looked at the code and first call is to the standard feed which is most_viewed. If you point your browser at https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed you'll get a similar response.