aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/bbc.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-07-31 01:22:07 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-07-31 01:22:07 -0400
commitd9539f96cc7ac112b7d8faad022190fbbc88c745 (patch)
tree471249d60b9202c00d7d82abec8b296fc881292e /gallery_dl/extractor/bbc.py
parent889fc15f272118bf277737b6fac29d3faeffc641 (diff)
parenta6e995c093de8aae2e91a0787281bb34c0b871eb (diff)
Update upstream source from tag 'upstream/1.30.2'
Update to upstream version '1.30.2' with Debian dir f0dcd28a671f8600479182ff128e05ba8904a0d8
Diffstat (limited to 'gallery_dl/extractor/bbc.py')
-rw-r--r--gallery_dl/extractor/bbc.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/gallery_dl/extractor/bbc.py b/gallery_dl/extractor/bbc.py
index b398152..8efb3db 100644
--- a/gallery_dl/extractor/bbc.py
+++ b/gallery_dl/extractor/bbc.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2021-2023 Mike Fährmann
+# Copyright 2021-2025 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -33,7 +33,7 @@ class BbcGalleryExtractor(GalleryExtractor):
page, "<h1>", "</h1>").rpartition("</span>")[2]),
"description": text.unescape(text.extr(
page, 'property="og:description" content="', '"')),
- "programme": self.gallery_url.split("/")[4],
+ "programme": self.page_url.split("/")[4],
"path": list(util.unique_sequence(
element["name"]
for element in data["itemListElement"]
@@ -43,7 +43,7 @@ class BbcGalleryExtractor(GalleryExtractor):
def images(self, page):
width = self.config("width")
width = width - width % 16 if width else 1920
- dimensions = "/{}xn/".format(width)
+ dimensions = f"/{width}xn/"
results = []
for img in text.extract_iter(page, 'class="gallery__thumbnail', ">"):
@@ -60,12 +60,11 @@ class BbcGalleryExtractor(GalleryExtractor):
))
return results
- @staticmethod
- def _fallback_urls(src, max_width):
+ def _fallback_urls(self, src, max_width):
front, _, back = src.partition("/320x180_b/")
for width in (1920, 1600, 1280, 976):
if width < max_width:
- yield "{}/{}xn/{}".format(front, width, back)
+ yield f"{front}/{width}xn/{back}"
class BbcProgrammeExtractor(Extractor):