diff --git a/docs/configuration.rst b/docs/configuration.rst index 1cc14cf88a7..fe47be63710 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -783,6 +783,19 @@ Description * ``false``: Get posts from "Latest Updates" pages +extractor.bbc.width +------------------- +Type + ``int`` +Default + ``1920`` +Description + Specifies the requested image width. + + This value must be divisble by 16 and gets rounded down otherwise. + The maximum possible value appears to be ``1920``. + + extractor.blogger.videos ------------------------ Type diff --git a/docs/gallery-dl.conf b/docs/gallery-dl.conf index 9b2392c7775..2683206874d 100644 --- a/docs/gallery-dl.conf +++ b/docs/gallery-dl.conf @@ -41,6 +41,9 @@ "password": null, "recursive": true }, + "bbc": { + "width": 1920 + }, "blogger": { "videos": true diff --git a/gallery_dl/extractor/bbc.py b/gallery_dl/extractor/bbc.py index 1c8e4308423..56e0006ac5d 100644 --- a/gallery_dl/extractor/bbc.py +++ b/gallery_dl/extractor/bbc.py @@ -49,8 +49,12 @@ def metadata(self, page): } def images(self, page): + width = self.config("width") + width = width - width % 16 if width else 1920 + dimensions = "/{}xn/".format(width) + return [ - (src.replace("/320x180_b/", "/1920xn/"), None) + (src.replace("/320x180_b/", dimensions), None) for src in text.extract_iter(page, 'data-image-src="', '"') ]