From 87b0929bec514a58a828852f39bc1a607da2b84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 11 Apr 2019 20:31:05 +0200 Subject: [PATCH] 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. --- gallery_dl/extractor/flickr.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gallery_dl/extractor/flickr.py b/gallery_dl/extractor/flickr.py index c6a75096..a7df86b8 100644 --- a/gallery_dl/extractor/flickr.py +++ b/gallery_dl/extractor/flickr.py @@ -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