[bbc] improve image dimensions (#1706)
download the 1920xN versions instead of 976x549
This commit is contained in:
@@ -27,7 +27,7 @@ class BbcGalleryExtractor(GalleryExtractor):
|
|||||||
test = (
|
test = (
|
||||||
("https://www.bbc.co.uk/programmes/p084qtzs/p085g9kg", {
|
("https://www.bbc.co.uk/programmes/p084qtzs/p085g9kg", {
|
||||||
"pattern": r"https://ichef\.bbci\.co\.uk"
|
"pattern": r"https://ichef\.bbci\.co\.uk"
|
||||||
r"/images/ic/976x549_b/\w+\.jpg",
|
r"/images/ic/1920xn/\w+\.jpg",
|
||||||
"count": 37,
|
"count": 37,
|
||||||
"keyword": {
|
"keyword": {
|
||||||
"programme": "p084qtzs",
|
"programme": "p084qtzs",
|
||||||
@@ -50,8 +50,8 @@ class BbcGalleryExtractor(GalleryExtractor):
|
|||||||
|
|
||||||
def images(self, page):
|
def images(self, page):
|
||||||
return [
|
return [
|
||||||
(imgset.rpartition(", ")[2].partition(" ")[0], None)
|
(src.replace("/320x180_b/", "/1920xn/"), None)
|
||||||
for imgset in text.extract_iter(page, 'data-image-src-sets="', '"')
|
for src in text.extract_iter(page, 'data-image-src="', '"')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user