Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] XPath URL uses thumbnail's hostname #6152

Closed
matejdro opened this issue Mar 4, 2024 · 4 comments · Fixed by #6270
Closed

[BUG] XPath URL uses thumbnail's hostname #6152

matejdro opened this issue Mar 4, 2024 · 4 comments · Fixed by #6270

Comments

@matejdro
Copy link

matejdro commented Mar 4, 2024

Describe the bug

Recently (not sure if due to target website's update or FreshRSS's edge update, XPath URL resolving broke.

It seems that it uses hostname from the thumbnails is used for the article URL instead of regular website URL, which causes broken links (thumbnails are hosted on separate CDN host)

To Reproduce
Steps to reproduce the behavior:

  1. Add HTML + XPath feed from https://maribor24.si/lokalno/maribor/ with
    • XPath for finding news items: //div[contains(@class,'grid-cols-1')]/div
    • XPath (relative to item) for item title: descendant::a/div
    • XPath (relative to item) for item link (URL): descendant::a/@href (note that links in this are absolute, but without a domain)
    • XPath (relative to item) for item thumbnail: descendant::div[contains(@class,'mb-2.5')]/a/picture/img/@src
  2. Load that feed

Expected behavior

Article URL should point to a link on the domain of the actual website, for example maribor24.si/lokalno/maribor/v-mariboru-bodo-ta-konec-tedna-gostili-najvecji-mednarodni-znanstveni-dogodek/

Actual behavior

Article URL points to a CDN domain, which makes the link invalid. For example https://mb24.cdn1.maribor24.si/lokalno/maribor/v-mariboru-bodo-ta-konec-tedna-gostili-najvecji-mednarodni-znanstveni-dogodek/

Environment information (please complete the following information):

  • FreshRSS version: edge image, pulled on 2024-03-02T08:49:31Z
@Alkarex Alkarex added the Bug (unconfirmed) issues thar could not reproduced yeat label Mar 4, 2024
@Alkarex Alkarex added this to the 1.24.0 milestone Mar 4, 2024
@Alkarex Alkarex linked a pull request Apr 6, 2024 that will close this issue
@Alkarex
Copy link
Member

Alkarex commented Apr 6, 2024

Could you please check with this patch? #6270

@Alkarex Alkarex added Bug (confirmed) 🐞 issues that are reproducable SimplePie 🍰 and removed Bug (unconfirmed) issues thar could not reproduced yeat labels Apr 6, 2024
@matejdro
Copy link
Author

matejdro commented Apr 8, 2024

Sorry, I did not have the time yet to check. Will check now when develop build will be out. Thanks!

@Alkarex
Copy link
Member

Alkarex commented Apr 8, 2024

It is merged, so just can just pick the current edge version (e.g. freshrss/freshrss:edge if using Docker, or edge branch if using git)

@matejdro
Copy link
Author

Can confirm it's fixed with yesterday's edge. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants