The little things give you away... A collection of various small helper stuff
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

17 wiersze
353 B

  1. import collections
  2. import sys
  3. import yt_dlp
  4. with yt_dlp.YoutubeDL({'quiet': True}) as ydl:
  5. ie = ydl.get_info_extractor('YoutubeTab')
  6. for url in sys.argv[1:]:
  7. q = collections.deque()
  8. q.append(ie.extract(url))
  9. while q:
  10. e = q.popleft()
  11. if e['_type'] == 'playlist':
  12. q.extend(e['entries'])
  13. elif e['_type'] == 'url':
  14. print(e['id'])