Note
This is yet experimental product. It will be implemeted needy features incrementaly.
This is oEmbed client for Python.
- Simple usage
- Python 3.x native
- Multiple endpoint discovery
This is uploaded on PyPI.
pip install oEmbedPy
>>> from oembedpy.application import Oembed
>>> oembed = Oembed()
>>> content = oembed.fetch("https://twitter.com/attakei")
>>> print(content.type)
rich
Note
It needs Click for using CLI. Run extra install 'cli'.
Simple usage for author's video (omitted some output).
$ oEmbed.py 'https://www.youtube.com/watch?v=Oyh8nuaLASA'
title: Yoshi ( ...
author_name: attakei
thumbnail_height: 360
thumbnail_width: 400
If you want JSON, use --foramt
option.
$ oEmbed.py --format=json 'https://www.youtube.com/watch?v=Oyh8nuaLASA'
{"title":"Yoshi (NES - Nint ..."}
This has extension for easy-using. Please see documentation.
Apache License 2.0