apksearch 1.2.6__tar.gz → 1.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apksearch-1.2.6 → apksearch-1.2.7}/PKG-INFO +18 -5
- {apksearch-1.2.6 → apksearch-1.2.7}/README.md +17 -4
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/__init__.py +3 -2
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/cli.py +28 -2
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/sites/apkad.py +1 -1
- apksearch-1.2.7/apksearch/sites/aptoide.py +102 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch.egg-info/PKG-INFO +18 -5
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch.egg-info/SOURCES.txt +3 -1
- {apksearch-1.2.6 → apksearch-1.2.7}/pyproject.toml +1 -1
- {apksearch-1.2.6 → apksearch-1.2.7}/tests/test_apkmirror.py +1 -1
- apksearch-1.2.7/tests/test_aptoide.py +29 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/LICENSE +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/__main__.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/sites/__init__.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/sites/apkcombo.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/sites/apkfab.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/sites/apkmirror.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/sites/apkpure.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch/sites/appteka.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch.egg-info/dependency_links.txt +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch.egg-info/entry_points.txt +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch.egg-info/requires.txt +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/apksearch.egg-info/top_level.txt +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/setup.cfg +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/tests/test_apkcombo.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/tests/test_apkfab.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/tests/test_apkpure.py +0 -0
- {apksearch-1.2.6 → apksearch-1.2.7}/tests/test_appteka.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: apksearch
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.7
|
4
4
|
Summary: Search for apks on varius websites
|
5
5
|
Author-email: Abhi <allinoneallinone00@gmail.com>
|
6
6
|
License: MIT License
|
@@ -76,6 +76,7 @@ There were countless occasions when I needed a specific APK for a package name,
|
|
76
76
|
|
77
77
|
- [APKPure](https://apkpure.net/)
|
78
78
|
- [APKMirror](https://www.apkmirror.com/)
|
79
|
+
- [Aptoide](https://en.aptoide.com/)
|
79
80
|
- [APKCombo](https://apkcombo.app/)
|
80
81
|
- [APKFab](https://apkfab.com/)
|
81
82
|
- [Appteka](https://appteka.store/)
|
@@ -89,7 +90,7 @@ There were countless occasions when I needed a specific APK for a package name,
|
|
89
90
|
|
90
91
|
## Installation
|
91
92
|
|
92
|
-
To install the `apksearch` library, use the following command:
|
93
|
+
To install/upgrade the `apksearch` library, use the following command:
|
93
94
|
|
94
95
|
```sh
|
95
96
|
pip install -U git+https://github.com/AbhiTheModder/apksearch.git
|
@@ -101,6 +102,12 @@ OR, through pip:
|
|
101
102
|
pip install -U apksearch
|
102
103
|
```
|
103
104
|
|
105
|
+
OR, if you've cloned the repository locally you can do so via:
|
106
|
+
|
107
|
+
```sh
|
108
|
+
pip install -U . # or path to the local clone
|
109
|
+
```
|
110
|
+
|
104
111
|
## Usage
|
105
112
|
|
106
113
|
### Command-Line Interface
|
@@ -144,19 +151,25 @@ if result:
|
|
144
151
|
#### `APKPure` | `APKCombo` | `APKFab`
|
145
152
|
|
146
153
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
147
|
-
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK
|
154
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
148
155
|
- **`find_versions(self, apk_link: str) -> list[tuple[str, str]]`**: Finds and returns a list of versions and their download links for the given APK link.
|
149
156
|
|
150
157
|
#### `APKMirror`
|
151
158
|
|
152
159
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
153
|
-
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK
|
160
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
154
161
|
- **`find_version(self, apk_link: str, version: str) -> str`**: Finds and returns the download link for the given APK link and version.
|
155
162
|
|
156
163
|
#### `AppTeka` | `APKAD`
|
157
164
|
|
158
165
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
159
|
-
- **`search_apk(self, version: str = None) -> None | tuple[str, str]`**: Searches for the APK
|
166
|
+
- **`search_apk(self, version: str = None) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found. If a version is provided, it checks if that version is available and returns the corresponding download link, None otherwise. If no version is provided, it returns the link for the latest version available.
|
167
|
+
|
168
|
+
#### `Aptoide`
|
169
|
+
|
170
|
+
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
171
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
172
|
+
- **`find_versions(self, apk_link: str, version: str) -> list[str]`**: Finds and returns the download links for the given APK link and versions list.
|
160
173
|
|
161
174
|
### Testing
|
162
175
|
|
@@ -24,6 +24,7 @@ There were countless occasions when I needed a specific APK for a package name,
|
|
24
24
|
|
25
25
|
- [APKPure](https://apkpure.net/)
|
26
26
|
- [APKMirror](https://www.apkmirror.com/)
|
27
|
+
- [Aptoide](https://en.aptoide.com/)
|
27
28
|
- [APKCombo](https://apkcombo.app/)
|
28
29
|
- [APKFab](https://apkfab.com/)
|
29
30
|
- [Appteka](https://appteka.store/)
|
@@ -37,7 +38,7 @@ There were countless occasions when I needed a specific APK for a package name,
|
|
37
38
|
|
38
39
|
## Installation
|
39
40
|
|
40
|
-
To install the `apksearch` library, use the following command:
|
41
|
+
To install/upgrade the `apksearch` library, use the following command:
|
41
42
|
|
42
43
|
```sh
|
43
44
|
pip install -U git+https://github.com/AbhiTheModder/apksearch.git
|
@@ -49,6 +50,12 @@ OR, through pip:
|
|
49
50
|
pip install -U apksearch
|
50
51
|
```
|
51
52
|
|
53
|
+
OR, if you've cloned the repository locally you can do so via:
|
54
|
+
|
55
|
+
```sh
|
56
|
+
pip install -U . # or path to the local clone
|
57
|
+
```
|
58
|
+
|
52
59
|
## Usage
|
53
60
|
|
54
61
|
### Command-Line Interface
|
@@ -92,19 +99,25 @@ if result:
|
|
92
99
|
#### `APKPure` | `APKCombo` | `APKFab`
|
93
100
|
|
94
101
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
95
|
-
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK
|
102
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
96
103
|
- **`find_versions(self, apk_link: str) -> list[tuple[str, str]]`**: Finds and returns a list of versions and their download links for the given APK link.
|
97
104
|
|
98
105
|
#### `APKMirror`
|
99
106
|
|
100
107
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
101
|
-
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK
|
108
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
102
109
|
- **`find_version(self, apk_link: str, version: str) -> str`**: Finds and returns the download link for the given APK link and version.
|
103
110
|
|
104
111
|
#### `AppTeka` | `APKAD`
|
105
112
|
|
106
113
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
107
|
-
- **`search_apk(self, version: str = None) -> None | tuple[str, str]`**: Searches for the APK
|
114
|
+
- **`search_apk(self, version: str = None) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found. If a version is provided, it checks if that version is available and returns the corresponding download link, None otherwise. If no version is provided, it returns the link for the latest version available.
|
115
|
+
|
116
|
+
#### `Aptoide`
|
117
|
+
|
118
|
+
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
119
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
120
|
+
- **`find_versions(self, apk_link: str, version: str) -> list[str]`**: Finds and returns the download links for the given APK link and versions list.
|
108
121
|
|
109
122
|
### Testing
|
110
123
|
|
@@ -3,6 +3,7 @@ from .sites.apkmirror import APKMirror
|
|
3
3
|
from .sites.appteka import AppTeka
|
4
4
|
from .sites.apkcombo import APKCombo
|
5
5
|
from .sites.apkfab import APKFab
|
6
|
-
from .sites.apkad import
|
6
|
+
from .sites.apkad import APKad
|
7
|
+
from .sites.aptoide import Aptoide
|
7
8
|
|
8
|
-
__all__ = ["APKPure", "APKMirror", "AppTeka", "APKCombo", "APKFab", "
|
9
|
+
__all__ = ["APKPure", "APKMirror", "AppTeka", "APKCombo", "APKFab", "APKad", "Aptoide"]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import argparse
|
2
2
|
|
3
3
|
from collections.abc import Callable
|
4
|
-
from apksearch import APKPure, APKMirror, AppTeka, APKCombo, APKFab,
|
4
|
+
from apksearch import APKPure, APKMirror, AppTeka, APKCombo, APKFab, APKad, Aptoide
|
5
5
|
from requests.exceptions import ConnectionError, ConnectTimeout
|
6
6
|
|
7
7
|
# Color codes
|
@@ -80,7 +80,7 @@ def search_apkfab(pkg_name: str, version: str | None) -> None:
|
|
80
80
|
|
81
81
|
|
82
82
|
def search_apkad(pkg_name: str, version: str | None) -> None:
|
83
|
-
apkad =
|
83
|
+
apkad = APKad(pkg_name)
|
84
84
|
try:
|
85
85
|
result_apkad: tuple[str, str] | None = apkad.search_apk()
|
86
86
|
except (ConnectionError, ConnectTimeout):
|
@@ -167,6 +167,30 @@ def search_appteka(pkg_name: str, version: str | None) -> None:
|
|
167
167
|
print(f"{BOLD}AppTeka:{NC} No Results!")
|
168
168
|
|
169
169
|
|
170
|
+
def search_aptoide(pkg_name: str, version: str | None) -> None:
|
171
|
+
aptoide = Aptoide(pkg_name)
|
172
|
+
try:
|
173
|
+
result_aptoide: tuple[str, str] | None = aptoide.search_apk()
|
174
|
+
except (ConnectionError, ConnectTimeout):
|
175
|
+
result_aptoide = None
|
176
|
+
print(f"{RED}Failed to resolve 'aptoide.com'!{NC}")
|
177
|
+
if result_aptoide:
|
178
|
+
title, apk_link = result_aptoide
|
179
|
+
print(f"{BOLD}Aptoide:{NC} Found {GREEN}{title}{NC}") if title else None
|
180
|
+
print(f" ╰─> {BOLD}Link: {YELLOW}{apk_link}{NC}") if not version else None
|
181
|
+
if version:
|
182
|
+
versions: list[str | None] = aptoide.find_versions(apk_link)
|
183
|
+
if versions:
|
184
|
+
if version in versions:
|
185
|
+
print(
|
186
|
+
f" ╰─> {BOLD}Version: {GREEN}{version}{NC} - {YELLOW}{apk_link}versions{NC}"
|
187
|
+
)
|
188
|
+
else:
|
189
|
+
print(f"{BOLD}Aptoide:{NC} Version {RED}{version}{NC} not found!")
|
190
|
+
else:
|
191
|
+
print(f"{BOLD}Aptoide:{NC} No Results!")
|
192
|
+
|
193
|
+
|
170
194
|
def main():
|
171
195
|
parser = argparse.ArgumentParser(
|
172
196
|
prog="APKSearch", description="Search for APKs on various websites"
|
@@ -186,6 +210,8 @@ def main():
|
|
186
210
|
search(search_apkpure, pkg_name, version, log_err)
|
187
211
|
# Initiate search on apkmirror
|
188
212
|
search(search_apkmirror, pkg_name, version, log_err)
|
213
|
+
# Initiate search on aptoide
|
214
|
+
search(search_aptoide, pkg_name, version, log_err)
|
189
215
|
# Initiate search on appteka
|
190
216
|
search(search_appteka, pkg_name, version, log_err)
|
191
217
|
# Initiate search on apkcombo
|
@@ -0,0 +1,102 @@
|
|
1
|
+
import re
|
2
|
+
from bs4 import BeautifulSoup
|
3
|
+
import requests
|
4
|
+
|
5
|
+
|
6
|
+
class Aptoide:
|
7
|
+
"""
|
8
|
+
This class provides methods to search for an APK on Aptoide based on package name,
|
9
|
+
and to find available versions and their download links for a given APK link.
|
10
|
+
|
11
|
+
Parameters:
|
12
|
+
pkg_name (str): The package name of the APK to search for.
|
13
|
+
|
14
|
+
Attributes:
|
15
|
+
pkg_name (str): The package name of the APK to search for.
|
16
|
+
api_url (str): The base URL for the Aptoide API.
|
17
|
+
search_url (str): The URL used to search for APKs on Aptoide.
|
18
|
+
headers (dict): The headers used for making HTTP requests.
|
19
|
+
session (requests.Session): The session object used for making HTTP requests.
|
20
|
+
|
21
|
+
Methods:
|
22
|
+
search_apk() -> None | tuple[str, str]:
|
23
|
+
Searches for the APK on Aptoide and returns the title and link if found.
|
24
|
+
|
25
|
+
find_versions(apk_link: str) -> list[str | None]:
|
26
|
+
Finds and returns a list of versions for the given APK link.
|
27
|
+
"""
|
28
|
+
|
29
|
+
def __init__(self, pkg_name: str):
|
30
|
+
self.pkg_name = pkg_name
|
31
|
+
self.api_url = "https://ws75.aptoide.com/api/7"
|
32
|
+
self.search_url = f"{self.api_url}/apps/search?limit=1&query="
|
33
|
+
self.headers = {
|
34
|
+
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
35
|
+
"accept-language": "en-US,en;q=0.9,en-IN;q=0.8",
|
36
|
+
"cache-control": "no-cache",
|
37
|
+
"dnt": "1",
|
38
|
+
"pragma": "no-cache",
|
39
|
+
"priority": "u=0, i",
|
40
|
+
"referer": "https://en.aptoide.com/",
|
41
|
+
"sec-ch-ua": '"Not A(Brand";v="8", "Chromium";v="132", "Microsoft Edge";v="132"',
|
42
|
+
"sec-ch-ua-mobile": "?0",
|
43
|
+
"sec-ch-ua-platform": '"Windows"',
|
44
|
+
"sec-fetch-dest": "document",
|
45
|
+
"sec-fetch-mode": "navigate",
|
46
|
+
"sec-fetch-site": "same-origin",
|
47
|
+
"sec-fetch-user": "?1",
|
48
|
+
"upgrade-insecure-requests": "1",
|
49
|
+
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
|
50
|
+
}
|
51
|
+
self.session = requests.Session()
|
52
|
+
|
53
|
+
def search_apk(self) -> None | tuple[str, str]:
|
54
|
+
"""
|
55
|
+
Searches for the APK on Aptoide and returns the title and link if found.
|
56
|
+
|
57
|
+
Returns:
|
58
|
+
None: If no matching APK is found.
|
59
|
+
tuple[str, str]: A tuple containing the title and link of the matching APK if found.
|
60
|
+
"""
|
61
|
+
pkg_name = self.pkg_name
|
62
|
+
url = self.search_url + pkg_name
|
63
|
+
response: requests.Response = self.session.get(url, headers=self.headers)
|
64
|
+
data = response.json()
|
65
|
+
if data and data["info"]["status"] == "OK":
|
66
|
+
lis = data["datalist"]["list"]
|
67
|
+
if lis:
|
68
|
+
package = data["datalist"]["list"][0]["package"]
|
69
|
+
apk_title = data["datalist"]["list"][0]["name"]
|
70
|
+
if package == pkg_name:
|
71
|
+
app_id: int = data["datalist"]["list"][0]["id"]
|
72
|
+
meta_url = self.api_url + f"/app/getMeta?app_id={app_id}"
|
73
|
+
meta_response: requests.Response = self.session.get(
|
74
|
+
meta_url, headers=self.headers
|
75
|
+
)
|
76
|
+
meta_data = meta_response.json()
|
77
|
+
if meta_data and meta_data["info"]["status"] == "OK":
|
78
|
+
url = meta_data["data"]["urls"]["w"].split("?")[0]
|
79
|
+
return apk_title, url
|
80
|
+
return None
|
81
|
+
|
82
|
+
def find_versions(self, apk_link: str) -> list[str | None]:
|
83
|
+
"""
|
84
|
+
Finds and returns a list of versions for the given APK link.
|
85
|
+
|
86
|
+
Parameters:
|
87
|
+
apk_link (str): The link to the APK on the Aptoide website.
|
88
|
+
|
89
|
+
Returns:
|
90
|
+
list[str | None]: A list of version strings for the given APK link.
|
91
|
+
"""
|
92
|
+
versions_info = []
|
93
|
+
|
94
|
+
url = apk_link + "/versions"
|
95
|
+
response: requests.Response = self.session.get(url, headers=self.headers)
|
96
|
+
soup = BeautifulSoup(response.content, "html.parser")
|
97
|
+
version_spans = soup.find_all("span", string=re.compile(r"^\d+\.\d+\.\d+$"))
|
98
|
+
for span in version_spans:
|
99
|
+
version = span.text
|
100
|
+
versions_info.append(version)
|
101
|
+
|
102
|
+
return versions_info
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: apksearch
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.7
|
4
4
|
Summary: Search for apks on varius websites
|
5
5
|
Author-email: Abhi <allinoneallinone00@gmail.com>
|
6
6
|
License: MIT License
|
@@ -76,6 +76,7 @@ There were countless occasions when I needed a specific APK for a package name,
|
|
76
76
|
|
77
77
|
- [APKPure](https://apkpure.net/)
|
78
78
|
- [APKMirror](https://www.apkmirror.com/)
|
79
|
+
- [Aptoide](https://en.aptoide.com/)
|
79
80
|
- [APKCombo](https://apkcombo.app/)
|
80
81
|
- [APKFab](https://apkfab.com/)
|
81
82
|
- [Appteka](https://appteka.store/)
|
@@ -89,7 +90,7 @@ There were countless occasions when I needed a specific APK for a package name,
|
|
89
90
|
|
90
91
|
## Installation
|
91
92
|
|
92
|
-
To install the `apksearch` library, use the following command:
|
93
|
+
To install/upgrade the `apksearch` library, use the following command:
|
93
94
|
|
94
95
|
```sh
|
95
96
|
pip install -U git+https://github.com/AbhiTheModder/apksearch.git
|
@@ -101,6 +102,12 @@ OR, through pip:
|
|
101
102
|
pip install -U apksearch
|
102
103
|
```
|
103
104
|
|
105
|
+
OR, if you've cloned the repository locally you can do so via:
|
106
|
+
|
107
|
+
```sh
|
108
|
+
pip install -U . # or path to the local clone
|
109
|
+
```
|
110
|
+
|
104
111
|
## Usage
|
105
112
|
|
106
113
|
### Command-Line Interface
|
@@ -144,19 +151,25 @@ if result:
|
|
144
151
|
#### `APKPure` | `APKCombo` | `APKFab`
|
145
152
|
|
146
153
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
147
|
-
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK
|
154
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
148
155
|
- **`find_versions(self, apk_link: str) -> list[tuple[str, str]]`**: Finds and returns a list of versions and their download links for the given APK link.
|
149
156
|
|
150
157
|
#### `APKMirror`
|
151
158
|
|
152
159
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
153
|
-
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK
|
160
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
154
161
|
- **`find_version(self, apk_link: str, version: str) -> str`**: Finds and returns the download link for the given APK link and version.
|
155
162
|
|
156
163
|
#### `AppTeka` | `APKAD`
|
157
164
|
|
158
165
|
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
159
|
-
- **`search_apk(self, version: str = None) -> None | tuple[str, str]`**: Searches for the APK
|
166
|
+
- **`search_apk(self, version: str = None) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found. If a version is provided, it checks if that version is available and returns the corresponding download link, None otherwise. If no version is provided, it returns the link for the latest version available.
|
167
|
+
|
168
|
+
#### `Aptoide`
|
169
|
+
|
170
|
+
- **`__init__(self, pkg_name: str)`**: Initializes with the package name.
|
171
|
+
- **`search_apk(self) -> None | tuple[str, str]`**: Searches for the APK and returns the title and link if found.
|
172
|
+
- **`find_versions(self, apk_link: str, version: str) -> list[str]`**: Finds and returns the download links for the given APK link and versions list.
|
160
173
|
|
161
174
|
### Testing
|
162
175
|
|
@@ -17,8 +17,10 @@ apksearch/sites/apkfab.py
|
|
17
17
|
apksearch/sites/apkmirror.py
|
18
18
|
apksearch/sites/apkpure.py
|
19
19
|
apksearch/sites/appteka.py
|
20
|
+
apksearch/sites/aptoide.py
|
20
21
|
tests/test_apkcombo.py
|
21
22
|
tests/test_apkfab.py
|
22
23
|
tests/test_apkmirror.py
|
23
24
|
tests/test_apkpure.py
|
24
|
-
tests/test_appteka.py
|
25
|
+
tests/test_appteka.py
|
26
|
+
tests/test_aptoide.py
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "apksearch"
|
7
|
-
version = "1.2.
|
7
|
+
version = "1.2.7"
|
8
8
|
description = "Search for apks on varius websites"
|
9
9
|
authors = [{ name = "Abhi", email = "allinoneallinone00@gmail.com" }]
|
10
10
|
license = { file = "LICENSE" }
|
@@ -0,0 +1,29 @@
|
|
1
|
+
from apksearch.sites.aptoide import Aptoide
|
2
|
+
|
3
|
+
|
4
|
+
def test_search_apk():
|
5
|
+
query = "com.roblox.client"
|
6
|
+
aptoide = Aptoide(query)
|
7
|
+
result = aptoide.search_apk()
|
8
|
+
|
9
|
+
assert result is not None, "No APK found for the query."
|
10
|
+
assert isinstance(result, tuple), "Result should be a tuple."
|
11
|
+
assert len(result) == 2, "Tuple should contain two elements."
|
12
|
+
assert isinstance(result[0], str), "First element of the tuple should be a string."
|
13
|
+
assert isinstance(result[1], str), "Second element of the tuple should be a string."
|
14
|
+
|
15
|
+
|
16
|
+
def test_find_versions():
|
17
|
+
query = "com.roblox.client"
|
18
|
+
aptoide = Aptoide(query)
|
19
|
+
result = aptoide.search_apk()
|
20
|
+
|
21
|
+
if result:
|
22
|
+
apk_link = result[1]
|
23
|
+
versions = aptoide.find_versions(apk_link)
|
24
|
+
|
25
|
+
assert isinstance(versions, list), "Versions should be a list."
|
26
|
+
assert len(versions) > 0, "No versions found."
|
27
|
+
assert all(
|
28
|
+
isinstance(version, str) for version in versions
|
29
|
+
), "Each version should be a string."
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|