azimut / newspod

fully searchable db of podcasts that I am interested on
https://azimut.github.io/newspod/
MIT License
0 stars 0 forks source link

python: fetch full youtube playlist #15

Open azimut opened 6 months ago

azimut commented 6 months ago
azimut commented 6 months ago

https://tyrrrz.me/blog/reverse-engineering-youtube-revisited https://github.com/videolan/vlc/blob/master/share/ytdl-extract.py

yt_dlp.YoutubeDL(
            {
                'extract_flat': 'in_playlist',
                'youtube_include_dash_manifest': False
            })

outputs: entries/videos do NOT have date

{'id': 'PLFs19LVskfNxGjRZu_d_i93aSDraOSiJa',
 'title': 'Bridges Podcast',
 'description': 'Destiny and NotSoErudite talk to guests on the bridges podcast',
 'tags': [],
 'thumbnails': [
 'modified_date': '20240407',
 'view_count': 8303,
 'playlist_count': 3,
 'channel': 'Destiny',
 'channel_id': 'UC554eY5jNUfDq3yDOJYirOQ',
 'uploader_id': '@destiny',
 'uploader': 'Destiny',
 'channel_url': 'https://www.youtube.com/channel/UC554eY5jNUfDq3yDOJYirOQ',
 'uploader_url': 'https://www.youtube.com/@destiny',
 '_type': 'playlist',
'entries': [
{'_type': 'url',
 'ie_key': 'Youtube',
 'id': '7HNq8i3dvoc',
 'url': 'https://www.youtube.com/watch?v=7HNq8i3dvoc',
 'title': 'Confronting Alex Jones On Sandy Hook | Bridges #3 Krassenstein Brothers',
 'description': None,
 'duration': 2305,
 'channel_id': 'UC554eY5jNUfDq3yDOJYirOQ',
 'channel': 'Destiny',
 'channel_url': 'https://www.youtube.com/channel/UC554eY5jNUfDq3yDOJYirOQ',
 'uploader': 'Destiny',
 'uploader_id': '@destiny',
 'uploader_url': 'https://www.youtube.com/@destiny',
 'thumbnails': [
 'release_timestamp': None,
 'availability': None,
 'view_count': 117000,
 'live_status': None,
 'channel_is_verified': None,
 '__x_forwarded_for_ip': None}
azimut commented 5 months ago

Given the changes the feeds.db changes often get. I think it might be worth having a separate database for youtube/python content. That content should never change. I should put everything there.