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

Documentation example for Github tags stopped working. #723

Closed
mercurytoxic opened this issue Oct 7, 2022 · 5 comments
Closed

Documentation example for Github tags stopped working. #723

mercurytoxic opened this issue Oct 7, 2022 · 5 comments

Comments

@mercurytoxic
Copy link

In the documentation

in the section "Watching Github releases and Gitlab tags"

This is the corresponding version for Github tags:

url: https://github.com/thp/urlwatch/tags
filter:
  - xpath: (//div[contains(@class,"commit js-details-container Details")]//h4//a)[1]
  - html2text
  - strip

Stopped working for me a couple days ago. I assume there was a change to the structure of the site:

I fixed Github tags with this filter instead, this will give you the latest/top-most tag as result:

url: https://github.com/thp/urlwatch/tags
filter:
- xpath:
    path: //*[@class="Link--primary"]
    maxitems: 1
- html2text:

It also works for Github releases, which will include the latest/top-most release or pre-release:

url: https://github.com/Novik/ruTorrent/releases
filter:
- xpath:
    path: //*[@class="Link--primary"]
    maxitems: 1
- html2text:

If you only want to monitor the latest release and not include pre-releases:

url: https://github.com/Novik/ruTorrent/releases/latest
filter:
- xpath: //*[@class="ml-1"]
- html2text:
- strip

Thanks for a wonderful tool.

@thp
Copy link
Owner

thp commented Oct 14, 2022

Cool, do you want to create a PR against the documentation?

@bokkabonga
Copy link

url: https://github.com/Novik/ruTorrent/releases/latest
filter:
- xpath: //*[@class="ml-1"]
- html2text:
- strip

This doesn´t work for me. The one including pre-releases works fine however! Thanks for providing a solution :)

@thp thp closed this as completed in 1012e64 Nov 25, 2022
@thp
Copy link
Owner

thp commented Nov 25, 2022

Updated the documentation, thanks!

@bokkabonga
Copy link

Hi,

not sure if I should open a new issue for this. So I just commented here.

Two of the examples stopped working again, since the class name has slightly changed. "Link--primary" to "Link--primary Link".

Github tags

url: https://github.com/thp/urlwatch/tags
filter:
- xpath:
    path: //*[@class="Link--primary Link"]
    maxitems: 1
- html2text:

Github releases, including Prereleases

url: https://github.com/Novik/ruTorrent/releases
filter:
- xpath:
    path: //*[@class="Link--primary Link"]
    maxitems: 1
- html2text:

@thp
Copy link
Owner

thp commented Aug 1, 2023

not sure if I should open a new issue for this. So I just commented here.

Two of the examples stopped working again, since the class name has slightly changed. "Link--primary" to "Link--primary Link".

Updated docs with the new filters. Thanks!

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

No branches or pull requests

3 participants