michaelhelmick / lassie

Web Content Retrieval for Humans™
https://lassie.readthedocs.org
MIT License
614 stars 49 forks source link

Add other oembed providers #68

Open michaelhelmick opened 7 years ago

luthy2 commented 6 years ago

it appears that oembed resources are discoverable by doing something like

oembed = soup.find_all('link', rel=['alt', 'alternate', 'alternative'], type=['application/json+oembed', 'application/xml+oembed'])
oembed_json = requests.get(oembed[0].get('href')) 
#returns oembed json  or xml

this might be a good place to start

michaelhelmick commented 6 years ago

Hm, I was unaware of that. I have implemented youtube oembed in this pull request if you want to take a stab at adding any others!

https://github.com/michaelhelmick/lassie/pull/65/files