Revert "[flickr] restore image quality"

This reverts commit 3f513f10564a10ece8650e64d2233d8482fc14c7.

Both live.staticflickr and farmN.staticflickr servers now produce the
same image file with a lower overall quality than before this change in
Flickr's end.
This commit is contained in:
Mike Fährmann 2019-04-11 20:31:05 +02:00
parent e7cd5510d5
commit 87b0929bec
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -10,7 +10,6 @@
from .common import Extractor, Message
from .. import text, oauth, util, exception
import random
class FlickrExtractor(Extractor):
@ -26,13 +25,12 @@ class FlickrExtractor(Extractor):
self.load_extra = self.config("metadata", False)
def items(self):
farm = "//farm{}.".format(random.randint(1, 9))
info = self.data()
yield Message.Version, 1
yield Message.Directory, info
for photo in self.photos():
photo.update(info)
url = photo["photo"]["source"].replace("//live.", farm)
url = photo["photo"]["source"]
yield Message.Url, url, text.nameext_from_url(url, photo)
def data(self):
@ -96,8 +94,7 @@ class FlickrImageExtractor(FlickrExtractor):
info = {"id": self.item_id}
info["photo"] = size
farm = "//farm{}.".format(random.randint(1, 9))
url = size["source"].replace("//live.", farm)
url = size["source"]
text.nameext_from_url(url, info)
yield Message.Version, 1