From b92ec08b5a5585bb7364f9a59b3a503ceee160d2 Mon Sep 17 00:00:00 2001 From: raileo98 <164594063+raileo98@users.noreply.github.com> Date: Fri, 25 Oct 2024 06:18:14 +0000 Subject: [PATCH] Update rthk.py --- code/rthk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/rthk.py b/code/rthk.py index e325ad62e..d5f51e1f1 100644 --- a/code/rthk.py +++ b/code/rthk.py @@ -310,7 +310,7 @@ async def process_article(fg, category, article): imgHtml = '' imgList = set() for image in images: - imgUrl = modify_image_url('https://images.weserv.nl/?n=-1&output=webp&trim=1&url=' + urllib.parse.quote_plus(image['src']), 99) + imgUrl = modify_image_url('https://images.weserv.nl/?n=-1&we&h=1080&output=webp&trim=1&url=' + urllib.parse.quote_plus(image['src']), 99) print(f"{articleLink} - {articleTitle}: {imgUrl}") imgList.add(imgUrl) @@ -344,7 +344,7 @@ async def process_article(fg, category, article): match = re.search(r"videoThumbnail\s{0,1000}=\s{0,1000}'(.*)'", script.text) if match: video_thumbnail = match.group(1) - imgUrl = modify_image_url('https://images.weserv.nl/?n=-1&output=webp&trim=1&url=' + urllib.parse.quote_plus(video_thumbnail), 99) + imgUrl = modify_image_url('https://images.weserv.nl/?n=-1&we&h=1080&output=webp&trim=1&url=' + urllib.parse.quote_plus(video_thumbnail), 99) print(f"{articleLink} - {articleTitle}: {imgUrl}") imgList.add(imgUrl)