The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- import collections
- import sys
- import yt_dlp
-
-
- with yt_dlp.YoutubeDL({'quiet': True}) as ydl:
- ie = ydl.get_info_extractor('YoutubeTab')
- for url in sys.argv[1:]:
- q = collections.deque()
- q.append(ie.extract(url))
- while q:
- e = q.popleft()
- if e['_type'] == 'playlist':
- q.extend(e['entries'])
- elif e['_type'] == 'url':
- print(e['id'])
|