Open embryo10 opened 7 years ago
Odd. It seems statistics
is present for most of the videos, but it reaches one where it is missing:
{'contentDetails': {'caption': 'false',
'definition': 'sd',
'dimension': '2d',
'duration': 'PT4M23S',
'licensedContent': True,
'projection': 'rectangular'},
'etag': '"m2yskBQFythfE4irbTIeOgYYfBU/oTuBkTF3zirKQ85Cj0EgM78FUF0"',
'id': 'iQ4D273C7Ac',
'kind': 'youtube#video',
'snippet': {'categoryId': '10',
'channelId': 'UCxnQCDKv8K2XYuqp9DgqRaA',
'channelTitle': 'TruThoughtsRecords',
'description': 'Tru Thoughts Covers is a mighty selection of the '
'most pivotal and interesting cover versions to '
'have peppered Tru Thoughts ten year history of '
'releases, boasting many crossover hits.',
'liveBroadcastContent': 'none',
'localized': {'description': 'Tru Thoughts Covers is a mighty '
'selection of the most pivotal and '
'interesting cover versions to have '
'peppered Tru Thoughts ten year '
'history of releases, boasting many '
'crossover hits.',
'title': 'Nostalgia 77 Feat Alice Russell - Seven '
'Nation Army (The White Stripes Cover)'},
'publishedAt': '2009-08-04T10:49:57.000Z',
'tags': ['Nostalgia 77',
'Alice Russell',
'Seven Nation Army',
'The White Stripes',
'Tru Thoughts'],
'thumbnails': {'default': {'height': 90,
'url': 'https://i.ytimg.com/vi/iQ4D273C7Ac/default.jpg',
'width': 120},
'high': {'height': 360,
'url': 'https://i.ytimg.com/vi/iQ4D273C7Ac/hqdefault.jpg',
'width': 480},
'medium': {'height': 180,
'url': 'https://i.ytimg.com/vi/iQ4D273C7Ac/mqdefault.jpg',
'width': 320}},
'title': 'Nostalgia 77 Feat Alice Russell - Seven Nation Army '
'(The White Stripes Cover)'}}
Most of them are OK but I think that there are 5 of the problematic ones in the example list:
On 9/4/2017 1:19 πμ, Ian Douglas Scott wrote:
Odd. It seems |statistics| is present for most of the videos, but it reaches one where it is missing:
|{'contentDetails': {'caption': 'false', 'definition': 'sd', 'dimension': '2d', 'duration': 'PT4M23S', 'licensedContent': True, 'projection': 'rectangular'}, 'etag': '"m2yskBQFythfE4irbTIeOgYYfBU/oTuBkTF3zirKQ85Cj0EgM78FUF0"', 'id': 'iQ4D273C7Ac', 'kind': 'youtube#video', 'snippet': {'categoryId': '10', 'channelId': 'UCxnQCDKv8K2XYuqp9DgqRaA', 'channelTitle': 'TruThoughtsRecords', 'description': 'Tru Thoughts Covers is a mighty selection of the ' 'most pivotal and interesting cover versions to ' 'have peppered Tru Thoughts ten year history of ' 'releases, boasting many crossover hits.', 'liveBroadcastContent': 'none', 'localized': {'description': 'Tru Thoughts Covers is a mighty ' 'selection of the most pivotal and ' 'interesting cover versions to have ' 'peppered Tru Thoughts ten year ' 'history of releases, boasting many ' 'crossover hits.', 'title': 'Nostalgia 77 Feat Alice Russell - Seven ' 'Nation Army (The White Stripes Cover)'}, 'publishedAt': '2009-08-04T10:49:57.000Z', 'tags': ['Nostalgia 77', 'Alice Russell', 'Seven Nation Army', 'The White Stripes', 'Tru Thoughts'], 'thumbnails': {'default': {'height': 90, 'url': 'https://i.ytimg.com/vi/iQ4D273C7Ac/default.jpg', 'width': 120}, 'high': {'height': 360, 'url': 'https://i.ytimg.com/vi/iQ4D273C7Ac/hqdefault.jpg', 'width': 480}, 'medium': {'height': 180, 'url': 'https://i.ytimg.com/vi/iQ4D273C7Ac/mqdefault.jpg', 'width': 320}}, 'title': 'Nostalgia 77 Feat Alice Russell - Seven Nation Army ' '(The White Stripes Cover)'}} |
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mps-youtube/pafy/issues/169#issuecomment-292749571, or mute the thread https://github.com/notifications/unsubscribe-auth/AISEw0K2sYV6p4KOFTbH0gS-HMBUwgm4ks5ruAfkgaJpZM4M31eW.
PR #171 should fix this.
While trying to get a playlist using the get_playlist method of pafy I get a couple of errors. pafy version 0.5.3.1 Using this YouTube link I get the following error:
It seems there is a missing key there. I change the for loop in the playlist.py like this:
Solved this, but then I get another error:
I found out that "views" is getting me a tuple instead of a string. A fast hack was to change the populate_from_playlist method like this:
This did the trick and let me get the playlist OK.