diff --git a/APK-Info.ini b/APK-Info.ini index dc24d9c..2b718ce 100644 Binary files a/APK-Info.ini and b/APK-Info.ini differ diff --git a/Application-source/APK-Info.au3 b/Application-source/APK-Info.au3 index 70babf2..db609f4 100644 --- a/Application-source/APK-Info.au3 +++ b/Application-source/APK-Info.au3 @@ -172,6 +172,7 @@ $strExceededTimeout = IniRead($IniFile, $LangSection, "ExceededTimeout", "Exceed $strCheckUpdate = IniRead($IniFile, $LangSection, "CheckUpdate", "Check update") $strYes = IniRead($IniFile, $LangSection, "Yes", "Yes") $strNo = IniRead($IniFile, $LangSection, "No", "No") +$strNotFound = IniRead($IniFile, $LangSection, "NotFound", "Not found") $strUses = IniRead($IniFile, $LangSection, "Uses", "uses") $strImplied = IniRead($IniFile, $LangSection, "Implied", "implied") @@ -1782,32 +1783,36 @@ Func _checkUpdate() ProgressOn($strCheckUpdate, $strPlayStore) $out = $strPlayStore & ':' & @CRLF $url1 = $playStoreUrl & $apk_PkgName - $foo = _Run('latest', $toolsDir & 'curl -k --ssl-no-revoke -L "' & $url1 & '"', $STDERR_CHILD + $STDOUT_CHILD + $STDERR_MERGED) + $foo = _Run($strPlayStore, $toolsDir & 'curl -k --ssl-no-revoke -L -A "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0" "' & $url1 & '"', $STDERR_CHILD + $STDOUT_CHILD + $STDERR_MERGED) ProgressSet(20) $output = _readAll($foo, $strPlayStore) ProgressSet(30) + ;MsgBox(0, $url1, $output) $ver = StringRegExp($output, 'Current Version([^<]*?)', $STR_REGEXPARRAYMATCH) If @error == 0 Then $ver = StringStripWS($ver[0], $STR_STRIPLEADING + $STR_STRIPTRAILING) - If $ver <> $apk_Version Then $ver = $ver & ' <--- ' & $strNewVersionIsAvailable + If $ver <> $apk_Version Then $ver = $ver & ' <--- ' & $strNewVersionIsAvailable Else $ver = 'error: ' & @error + If StringInStr($output, 'Not Found') Then $ver = $strNotFound EndIf $out = $out & $ver & @CRLF $out = $out & @CRLF & $strApkPure & ':' & @CRLF ProgressSet(50, '', $strApkPure) $url2 = $apkPureUrl & $apk_PkgName - $foo = _Run('latest', $toolsDir & 'curl -k --ssl-no-revoke -L "' & $url2 & '"', $STDERR_CHILD + $STDOUT_CHILD + $STDERR_MERGED) + $foo = _Run($strApkPure, $toolsDir & 'curl -k --ssl-no-revoke -L -A "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0" "' & $url2 & '"', $STDERR_CHILD + $STDOUT_CHILD + $STDERR_MERGED) ProgressSet(70) $output = _readAll($foo, $strApkPure) ProgressSet(80) - $ver = StringRegExp($output, '
([^<]*?)', $STR_REGEXPARRAYMATCH) + ;MsgBox(0, $url2, $output) + $ver = StringRegExp($output, "version_name: '([^']*?)'", $STR_REGEXPARRAYMATCH) If @error == 0 Then $ver = StringStripWS($ver[0], $STR_STRIPLEADING + $STR_STRIPTRAILING) If $ver <> $apk_Version Then $ver = $ver & ' <--- ' & $strNewVersionIsAvailable Else $ver = 'error: ' & @error + If StringInStr($output, '404') Then $ver = $strNotFound EndIf $out = $out & $ver & @CRLF