coleifer / micawber

a small library for extracting rich content from urls
http://micawber.readthedocs.org/
MIT License
635 stars 91 forks source link

Added support for Youtube playlist URLs #93

Closed shon closed 4 years ago

coleifer commented 4 years ago

Does this work? Can you point me to anything in the YT docs or elsewhere that indicates this is supported?

shon commented 4 years ago

@coleifer thanks. I checked again it seems playlist URLs work even without my patch. Sorry for trouble

import micawber
from micawber import Provider

providers = micawber.bootstrap_basic()
# providers.register(r'https://(\S*\.)?youtu(\.be/|be\.com/playlist)\S+',
#                    Provider('http://www.youtube.com/oembed?scheme=https&'))
url = 'https://youtube.com/watch?list=PLlyy26qgGoDALLLu4w3_N9_LdOuUYsjCb&v=KA20JmjxaPQ'
print(providers.request(url))