add mime parser: flickr.com
This commit is contained in:
@@ -438,6 +438,14 @@ class MakeamemeMIMEParser(OpenGraphMIMEParser):
|
|||||||
pattern = re.compile(r'https?://(www\.)?makeameme\.org/meme/.+$')
|
pattern = re.compile(r'https?://(www\.)?makeameme\.org/meme/.+$')
|
||||||
|
|
||||||
|
|
||||||
|
class FlickrMIMEParser(OpenGraphMIMEParser):
|
||||||
|
"""
|
||||||
|
Flickr uses the Open Graph protocol
|
||||||
|
"""
|
||||||
|
pattern = re.compile(r'https?://(www\.)?flickr\.com/photos/[^/]+/[^/]+/?$')
|
||||||
|
# TODO: handle albums/photosets (https://www.flickr.com/services/api)
|
||||||
|
|
||||||
|
|
||||||
# Parsers should be listed in the order they will be checked
|
# Parsers should be listed in the order they will be checked
|
||||||
parsers = [
|
parsers = [
|
||||||
ClippitUserMIMEParser,
|
ClippitUserMIMEParser,
|
||||||
@@ -452,6 +460,7 @@ parsers = [
|
|||||||
YoutubeMIMEParser,
|
YoutubeMIMEParser,
|
||||||
LiveleakMIMEParser,
|
LiveleakMIMEParser,
|
||||||
TwitchMIMEParser,
|
TwitchMIMEParser,
|
||||||
|
FlickrMIMEParser,
|
||||||
GifsMIMEParser,
|
GifsMIMEParser,
|
||||||
GiphyMIMEParser,
|
GiphyMIMEParser,
|
||||||
ImgtcMIMEParser,
|
ImgtcMIMEParser,
|
||||||
|
|||||||
1027
tests/cassettes/test_parser[flickr].yaml
Normal file
1027
tests/cassettes/test_parser[flickr].yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -118,6 +118,10 @@ URLS = OrderedDict([
|
|||||||
'http://makeameme.org/meme/joined-reddit-for',
|
'http://makeameme.org/meme/joined-reddit-for',
|
||||||
'https://media.makeameme.org/created/joined-reddit-for.jpg',
|
'https://media.makeameme.org/created/joined-reddit-for.jpg',
|
||||||
'image/jpeg')),
|
'image/jpeg')),
|
||||||
|
('flickr', (
|
||||||
|
'https://www.flickr.com/photos/obamawhitehouse/8191317327/',
|
||||||
|
'https://c1.staticflickr.com/9/8065/8191317327_5180e95d98_b.jpg',
|
||||||
|
'image/jpeg')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user