Skip to content

Commit

Permalink
Merge pull request #1962 from ImranR98/dev
Browse files Browse the repository at this point in the history
- Uptodown - fix broken web scraping logic (#1956)
- Add signature info to README (#1957)
  • Loading branch information
ImranR98 authored Nov 10, 2024
2 parents 919ab16 + 83616b7 commit 4caae51
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 36 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ Or, contribute some configurations to the website by creating a PR at [this repo
alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/dev.imranr.obtainium.fdroid/)

[PGP Public Key](https://keyserver.ubuntu.com/pks/lookup?search=contact%40imranr.dev&fingerprint=on&op=index)
Verification info:
- Package ID: `dev.imranr.obtainium`
- SHA-256 Hash of Signing Certificate: `B3:53:60:1F:6A:1D:5F:D6:60:3A:E2:F5:0B:E8:0C:F3:01:36:7B:86:B6:AB:8B:1F:66:24:3D:A9:6C:D5:73:62`
- Note: The above signature is also valid for the F-Droid flavour of Obtainium, thanks to [reproducible builds](https://f-droid.org/docs/Reproducible_Builds/).
- [PGP Public Key](https://keyserver.ubuntu.com/pks/lookup?search=contact%40imranr.dev&fingerprint=on&op=index) (to verify APK hashes)



## Limitations
- For some sources, data is gathered using Web scraping and can easily break due to changes in website design. In such cases, more reliable methods may be unavailable.
Expand Down
19 changes: 8 additions & 11 deletions lib/app_sources/uptodown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,16 @@ class Uptodown extends AppSource {
String? version = html.querySelector('div.version')?.innerHtml;
String? name = html.querySelector('#detail-app-name')?.innerHtml.trim();
String? author = html.querySelector('#author-link')?.innerHtml.trim();
var detailElements = html.querySelectorAll('#technical-information td');
String? appId = (detailElements.elementAtOrNull(2))?.innerHtml.trim();
String? dateStr = (detailElements.elementAtOrNull(29))?.innerHtml.trim();
var detailElements = html
.querySelectorAll('#technical-information td')
.map((e) => e.innerHtml.trim())
.where((e) => !e.startsWith('<'))
.toList();
String? appId = detailElements.elementAtOrNull(0);
String? dateStr = detailElements.elementAtOrNull(6);
String? fileId =
html.querySelector('#detail-app-name')?.attributes['data-file-id'];
String? extension = html
.querySelectorAll('td')
.where((e) => e.text.toLowerCase().trim() == 'file type')
.firstOrNull
?.nextElementSibling
?.text
.toLowerCase()
.trim();
String? extension = detailElements.elementAtOrNull(7)?.toLowerCase();
return Map.fromEntries([
MapEntry('version', version),
MapEntry('appId', appId),
Expand Down
44 changes: 22 additions & 22 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ packages:
dependency: "direct main"
description:
name: device_info_plus
sha256: c4af09051b4f0508f6c1dc0a5c085bf014d5c9a4a0678ce1799c2b4d716387a0
sha256: f545ffbadee826f26f2e1a0f0cbd667ae9a6011cc0f77c0f8f00a969655e6e95
url: "https://pub.dev"
source: hosted
version: "11.1.0"
version: "11.1.1"
device_info_plus_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -420,26 +420,26 @@ packages:
dependency: "direct main"
description:
name: flutter_local_notifications
sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35"
sha256: "725145682706fb0e5a30f93e5cb64f3df7ed7743de749bd555b22bf75ee718c0"
url: "https://pub.dev"
source: hosted
version: "17.2.4"
version: "18.0.0"
flutter_local_notifications_linux:
dependency: transitive
description:
name: flutter_local_notifications_linux
sha256: c49bd06165cad9beeb79090b18cd1eb0296f4bf4b23b84426e37dd7c027fc3af
sha256: "8f685642876742c941b29c32030f6f4f6dacd0e4eaecb3efbb187d6a3812ca01"
url: "https://pub.dev"
source: hosted
version: "4.0.1"
version: "5.0.0"
flutter_local_notifications_platform_interface:
dependency: transitive
description:
name: flutter_local_notifications_platform_interface
sha256: "85f8d07fe708c1bdcf45037f2c0109753b26ae077e9d9e899d55971711a4ea66"
sha256: "6c5b83c86bf819cdb177a9247a3722067dd8cc6313827ce7c77a4b238a26fd52"
url: "https://pub.dev"
source: hosted
version: "7.2.0"
version: "8.0.0"
flutter_localizations:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -819,10 +819,10 @@ packages:
dependency: "direct main"
description:
name: share_plus
sha256: "3af2cda1752e5c24f2fc04b6083b40f013ffe84fb90472f30c6499a9213d5442"
sha256: "9c9bafd4060728d7cdb2464c341743adbd79d327cb067ec7afb64583540b47c8"
url: "https://pub.dev"
source: hosted
version: "10.1.1"
version: "10.1.2"
share_plus_platform_interface:
dependency: transitive
description:
Expand All @@ -835,10 +835,10 @@ packages:
dependency: "direct main"
description:
name: shared_preferences
sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051"
sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.3.3"
shared_preferences_android:
dependency: transitive
description:
Expand Down Expand Up @@ -929,10 +929,10 @@ packages:
dependency: "direct main"
description:
name: sqflite
sha256: "79a297dc3cc137e758c6a4baf83342b039e5a6d2436fcdf3f96a00adaaf2ad62"
sha256: "2d7299468485dca85efeeadf5d38986909c5eb0cd71fd3db2c2f000e6c9454bb"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "2.4.1"
sqflite_android:
dependency: transitive
description:
Expand All @@ -953,10 +953,10 @@ packages:
dependency: transitive
description:
name: sqflite_darwin
sha256: "769733dddf94622d5541c73e4ddc6aa7b252d865285914b6fcd54a63c4b4f027"
sha256: "96a698e2bc82bd770a4d6aab00b42396a7c63d9e33513a56945cbccb594c2474"
url: "https://pub.dev"
source: hosted
version: "2.4.1-1"
version: "2.4.1"
sqflite_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -1145,10 +1145,10 @@ packages:
dependency: transitive
description:
name: webview_flutter_android
sha256: "74693a212d990b32e0b7055d27db973a18abf31c53942063948cdfaaef9787ba"
sha256: dec83a8da0a2dcd8a25418534cc59348dbc2855fa1dd0cc929c62b6029fde392
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "4.0.1"
webview_flutter_platform_interface:
dependency: transitive
description:
Expand All @@ -1161,18 +1161,18 @@ packages:
dependency: transitive
description:
name: webview_flutter_wkwebview
sha256: d4034901d96357beb1b6717ebf7d583c88e40cfc6eb85fe76dd1bf0979a9f251
sha256: f14ee08021772fed913da8daebcfdeb46be457081e521e93e9918fe6cd1ce9e8
url: "https://pub.dev"
source: hosted
version: "3.16.0"
version: "3.16.1"
win32:
dependency: transitive
description:
name: win32
sha256: "10169d3934549017f0ae278ccb07f828f9d6ea21573bab0fb77b0e1ef0fce454"
sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2"
url: "https://pub.dev"
source: hosted
version: "5.7.2"
version: "5.8.0"
win32_registry:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.1.29+2286
version: 1.1.30+2287

environment:
sdk: '>=3.0.0 <4.0.0'
Expand All @@ -38,7 +38,7 @@ dependencies:
cupertino_icons: ^1.0.5
path_provider: ^2.0.11
flutter_fgbg: ^0.6.0
flutter_local_notifications: ^17.0.0
flutter_local_notifications: ^18.0.0
provider: ^6.0.3
http: ^1.0.0
webview_flutter: ^4.0.0
Expand Down

0 comments on commit 4caae51

Please sign in to comment.