Skip to content

attakei/oEmbedPy

Repository files navigation

oEmbedPy

Overview

This is oEmbed client for Python.

Features

  • Simple usage
  • Python 3.x native
  • Multiple endpoint discovery

Installation

This is uploaded on PyPI.

pip install oEmbedPy

Usage

Library

>>> from oembedpy.application import Oembed

>>> oembed = Oembed()
>>> content = oembed.fetch("https://twitter.com/attakei")
>>> print(content.type)
rich

Commandline

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 --format option.

$ oEmbed.py --format=json 'https://www.youtube.com/watch?v=Oyh8nuaLASA'
{"title":"Yoshi (NES - Nint ..."}

Others

This has extension for easy-using. Please see documentation.

License

Apache License 2.0

About

oEmbed client for Python

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •  

Languages