ImranR98 / Obtainium

Get Android app updates straight from the source.
https://obtainium.imranr.dev
GNU General Public License v3.0
5.79k stars 137 forks source link

Version extraction regex fails #1640

Closed Araxeus closed 1 month ago

Araxeus commented 1 month ago

Prerequisites

Describe the bug Version extraction regex fail when set.

To Reproduce Add a version extraction regex, example provided below

Screenshots and Logs

Screenshot_2024-05-23-00-19-51-213_dev.imranr.obtainium-edit.jpg Screenshot_2024-05-23-00-21-26-327_dev.imranr.obtainium-edit.jpg

Please complete the following information:

Additional context

Here is an example: (It works ok if you remove regex extraction )

https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/{"id":"tv.twitch.android.app","url":"https://github.com/j-hc/revanced-magisk-module","author":"j-hc","name":"Twitch","preferredApkIndex":0,"additionalSettings":"{\"includePrereleases\":false,\"fallbackToOlderReleases\":true,\"filterReleaseTitlesByRegEx\":\"\",\"filterReleaseNotesByRegEx\":\"Twitch:\",\"verifyLatestTag\":false,\"dontSortReleasesList\":false,\"useLatestAssetDateAsReleaseDate\":false,\"trackOnly\":false,\"versionExtractionRegEx\":\"twitch-revanced-v(.+)-all\",\"matchGroupToUse\":\"1\",\"versionDetection\":false,\"releaseDateAsVersion\":false,\"useVersionCodeAsOSVersion\":false,\"apkFilterRegEx\":\"twitch-revanced\",\"invertAPKFilter\":false,\"autoApkFilterByArch\":false,\"appName\":\"Twitch-Revanced\",\"shizukuPretendToBeGooglePlay\":false,\"exemptFromBackgroundUpdates\":false,\"skipUpdateNotifications\":false,\"about\":\"\"}","overrideSource":null}

ImranR98 commented 1 month ago

Version extraction can only help you trim down the full version string when needed (in this case, that's 20220941). The only exception is the HTML source which has more complex version extraction. So it isn't possible to use it in this case.

Araxeus commented 1 month ago

Why can't it extract version from the apk name? It seems pretty easy to do?

(Or extract version from release notes or release name?)