2012-11-13 21:28:10 +00:00
|
|
|
import oembed
|
|
|
|
|
|
2026-03-02 16:25:43 +00:00
|
|
|
# URL patterns use python-oembed's glob-like syntax, not standard regex.
|
|
|
|
|
|
2021-12-08 14:07:57 +00:00
|
|
|
YOUTUBE = oembed.OEmbedEndpoint('https://www.youtube.com/oembed', [
|
2016-02-16 11:04:24 +00:00
|
|
|
'https?://(*.)?youtube.com/*',
|
|
|
|
|
'https?://youtu.be/*',
|
|
|
|
|
])
|
2012-11-13 21:28:10 +00:00
|
|
|
|
2026-03-02 16:25:43 +00:00
|
|
|
SLIDESHARE = oembed.OEmbedEndpoint('https://www.slideshare.net/api/oembed/2', [
|
|
|
|
|
'https?://www.slideshare.net/*/*',
|
|
|
|
|
'https?://fr.slideshare.net/*/*',
|
|
|
|
|
'https?://de.slideshare.net/*/*',
|
|
|
|
|
'https?://es.slideshare.net/*/*',
|
|
|
|
|
'https?://pt.slideshare.net/*/*',
|
2016-04-14 03:16:26 +00:00
|
|
|
])
|
|
|
|
|
|
2026-03-02 16:25:43 +00:00
|
|
|
FLICKR = oembed.OEmbedEndpoint('https://www.flickr.com/services/oembed/', [
|
2016-02-16 11:04:24 +00:00
|
|
|
'https?://*.flickr.com/*',
|
|
|
|
|
])
|
2015-04-21 09:18:42 +00:00
|
|
|
|
2022-08-02 12:13:40 +00:00
|
|
|
VIMEO = oembed.OEmbedEndpoint('https://vimeo.com/api/oembed.json', [
|
2016-02-16 11:04:24 +00:00
|
|
|
'https?://vimeo.com/*',
|
|
|
|
|
])
|
2015-04-21 09:18:42 +00:00
|
|
|
|
2016-02-16 11:04:24 +00:00
|
|
|
DEFAULT_ENDPOINTS = [
|
|
|
|
|
YOUTUBE,
|
|
|
|
|
FLICKR,
|
2016-04-14 03:16:26 +00:00
|
|
|
VIMEO,
|
2026-03-02 16:25:43 +00:00
|
|
|
SLIDESHARE,
|
2015-04-21 09:23:39 +00:00
|
|
|
]
|