-
Notifications
You must be signed in to change notification settings - Fork 178
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
Version Modification (Bug and Feature Request) #1235
Comments
What I described as the alternative is probably the best. |
Also, shout out to regex101.com because I'm doing this on mobile and it's a helpful tool for testing RegEx. |
This is kind of a bug too because the app shows that it needs an update if I hit reset install status even though the versions show up identical with the exception of the dashes vs the dots. |
As an example, the URL in question may look like this: In this scenario, the version is Under the Additional Options, the regex |
Another app I'm using is modded and it reports that base app version number in Android but the download link for the apk only has the mod version. They have the base version listed on their page and I was able to use the options in the screenshots to make it work perfectly because the site has dots in the version. |
I'll add to this, the app that I originally was talking about which has the problem is Minecraft on apkvision and I know they have the version listed with dots on the page, but unlike the app that works perfectly, apkvision lists older versions as well as Beta versions so I'm hoping that it doesn't get screwed up by that. I do have Intermediate link as |
Doesn't work because I need an intermediate link and that page does not have the version so I can't do that. Maybe the version extraction could let you choose what page? |
Also, I think Obtainium believes that 1.20.50.03 is newer than 1.20.51.01 |
This is the solution I've implemented (note that it's not right to call it a "regex" since it's a custom pattern). So you'll be able to set the 'match group' field to
Not a bug. The whole point of version detection is to avoid having to manually correct mistakes in the version shown by Obtainium. When version detection is disabled, you are given extra buttons to manually help correct errors. Don't press 'reset install status' if you don't need to.
Not a bug. As long as the versions are different, Obtainium assumes it's an update. This is because versions are not always numerical - they could be strings or some numerical system that isn't "bigger = newer". This way is more flexible.
What URL is causing that? |
This comment was marked as outdated.
This comment was marked as outdated.
Nvm, the cleartext bug will also be fixed in the next release: flutter/flutter#30368 |
- Remove reference to old plugin to avoid crashes (#1221) - Confirmation box for link-based imports (#1232) - Construct extracted versions from match groups (#1235) - Fix the WebView 'cleartext' error caused by HTTP sites (#1235) - Make GitHub's (and Codeberg's) "fallback" work with the APK filter (#1236) - Make version extraction universal (#1237) - HTML Bugfix (#1238)
Good catch, I would have forgotten to change that. |
I'm not sure if this is a bug so I'm posting the question. Is it intended that when doing Version Extraction RegEx, it applies to the last intermediate link page? If this is intended, I'll PR the Wiki and add this. Sometimes the original page has useful version info the intermediate does not. Maybe if we could specify a link for the Version Extraction RegEx to apply to, then that could be useful. (For example, I could apply it to the Minecraft Bedrock Release Changelogs, which are separate from the Beta changelogs (which would help in avoiding conflicts between releases and betas.) This could add complications like it not matching the version, but that's for the user, like me, to figure out. If I could specify the link to the original page then there wouldn't be any problems and if I could specify any other page that's not your problem. Also, specifying any page could be a hidden setting that's enabled in the Obtainium settings if you're worried people will bug you about it. Also, I can help a little with the documentation for everything (there's a lot that I would like to add), but I'll work on it after I'm more confident in my ability to use Obtainium.) |
It is meant to apply to the final APK link, not any intermediate/"middle" ones. Are you seeing different behaviour? We could always add a "Use for Version Extraction" toggle to each intermediate link. That way the user could indicate which link to use for version detection. If all intermediate links have that toggle disabled, we would stick to current behaviour. If multiple ones have it enabled, we would pick the last one which is able to successfully extract something. Feel free to create an issue for this.
Sure, PRs are welcome! |
I meant with the "Apply Version Extraction Regex to Entire Page" toggle enabled. |
In that case it should still apply to the final page on which the APK link is found. So if you're using in an intermediate link, the regex would apply not to the final intermediate link itself, but to the content of the final intermediate link page (which contains the actual returned APK link). Hope that makes sense. |
Yes, that makes sense and that is the behavior I discovered. I was suggesting any link to any page to use for the RegEx because there are cases where the apk is found on an intermediate page that doesn't contain the version. I won't have an immediate use case for this at the moment (thanks to the new implementation of Match Group), but it could come in handy. |
Prerequisites
Done
Done
Describe the feature
So we have Version extraction RegEx for HTML, but the app I'm working with has dashes on the apk link rather than dots. Since the Match group only allows a single integer I don't know what I can do. Maybe if there was a version modification RegEx then that would be helpful. Right now I have
minecraft\-pe\/(.*?)\/minecraft
with Match Group as1
but if I could modify the output and RegEx replace the dashes with dots that would work.For new Sources, it's preferable (not required) if you suggest how the following details can be extracted from the Source in a reliable way (like an API or through web scraping):
Note that the Web scraper cannot deal with JavaScript-enabled content. -->
Describe alternatives you've considered (if applicable)
The Match Group could have RegEx. So I would set the Version Extraction RegEx to
minecraft\-pe\/((\d+)-(\d+)-(\d+)-(\d+))\/minecraft
and have$1.$2.$3.$4
(maybe the dots need to be escaped:$1\.$2\.$3\.$4
. Maybe the Match Groups could just have a standard setup that allows entering multiple groups with a standard separator (up to you, but something like a dot or a comma) so that people could just make groups in the Version Extraction RegEx and then add them to the Match Group so that it would be easy to work with any versioning.Note that app-specific Sources are less likely to be added. In those cases, see if the HTML Source will work for you (if not, see if a generally-applicable enhancement to the HTML Source would work, and suggest that instead). -->
Additional context
What I have now:
The text was updated successfully, but these errors were encountered: