google-code-export / django-syncr

Automatically exported from code.google.com/p/django-syncr
0 stars 0 forks source link

YoutubeSyncr IndexError: list index out of range #87

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

  from syncr.app.youtube import YoutubeSyncr
  y = YoutubeSyncr()
  y.syncUserPlaylists('ballaratindependent')

What do you see instead?

Traceback (most recent call last):
  File "syncr_cron.py", line 13, in <module>
    y.syncUserUploads('ballaratindependent')
  File "/home/michael/django_apps/theballaratinde/syncr/app/youtube.py", line 221, in syncUserUploads
    video = self.syncVideoFeed(entry.findtext('{%s}id' % ATOM_NS))
  File "/home/michael/django_apps/theballaratinde/syncr/app/youtube.py", line 83, in syncVideoFeed
    result.findall('{%s}group/{%s}thumbnail' % (MRSS_NS, MRSS_NS)))[0].attrib['url'],

IndexError: list index out of range

What version of the product are you using? On what operating system?

the Latest svn

Please provide any additional information below.

This has been working fine for about 2 years.
then all of sudden its busted - I have this running o around 15 website all get 
the same error. thinking it's a YouTube API update maybe?

thanks for the awesome plugin - I'm loking in to it now will post back if I 
find a solution

Original issue reported on code.google.com by leon.dw...@theballaratindependent.com.au on 17 Aug 2011 at 3:18

GoogleCodeExporter commented 9 years ago
okay on line 87 you will find a filter value '240'
87         'thumbnail_url': filter(lambda x: x.attrib['height'] == '240',

it's a hack to find the thumbnail - you-tube have increased there thumb size to 
'360'
87         'thumbnail_url': filter(lambda x: x.attrib['height'] == '360',

Original comment by puffingb...@ascetinteractive.com on 17 Aug 2011 at 4:15