mirror of
https://github.com/Hopiu/python-markdown-oembed.git
synced 2026-03-16 22:10:24 +00:00
- Merged improvements from Wenzil's fork. Thanks Wenzil! - Update for new version of Markdown breaks backwards compatability. - Dropped test support for Python 2.6 - Fixed test suite (including Travis CI config)
21 lines
441 B
Python
21 lines
441 B
Python
# -*- coding: utf-8 -*-
|
|
import oembed
|
|
|
|
YOUTUBE = oembed.OEmbedEndpoint('http://www.youtube.com/oembed', [
|
|
'https?://(*.)?youtube.com/*',
|
|
'https?://youtu.be/*',
|
|
])
|
|
|
|
FLICKR = oembed.OEmbedEndpoint('http://www.flickr.com/services/oembed/', [
|
|
'https?://*.flickr.com/*',
|
|
])
|
|
|
|
VIMEO = oembed.OEmbedEndpoint('http://vimeo.com/api/oembed.json', [
|
|
'https?://vimeo.com/*',
|
|
])
|
|
|
|
DEFAULT_ENDPOINTS = [
|
|
YOUTUBE,
|
|
FLICKR,
|
|
VIMEO
|
|
]
|