Skip to content

Commit

Permalink
Update rthk.py
Browse files Browse the repository at this point in the history
  • Loading branch information
raileo98 authored Oct 22, 2024
1 parent d02cb24 commit 1be5601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/rthk.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ async def process_article(fg, category, article):
latest_imgUrl = await optimize_image_quality(imgUrl)

imgAlt = image.get('alt', '')
imgAlt = html.escape(imgAlt.strip())
imgAlt = html.escape(imgAlt.strip()).strip()

if latest_imgUrl:
latest_imgUrl = latest_imgUrl.replace('https://images.weserv.nl/', 'https://images.weserv.nl/')
Expand Down Expand Up @@ -357,7 +357,7 @@ async def process_article(fg, category, article):
latest_imgUrl = await optimize_image_quality(imgUrl)

imgAlt = article_soup.select_one('.detailNewsSlideTitleText').get_text()
imgAlt = html.escape(imgAlt.strip())
imgAlt = html.escape(imgAlt.strip()).strip()

if latest_imgUrl:
latest_imgUrl = latest_imgUrl.replace('https://images.weserv.nl/', 'https://images.weserv.nl/')
Expand Down

0 comments on commit 1be5601

Please sign in to comment.