23
23
24
24
import_library ("apksearch" )
25
25
26
- from apksearch import APKPure , APKMirror , AppTeka , APKCombo , APKFab
26
+ from apksearch import APKPure , APKMirror , AppTeka , APKCombo , APKFab , APKad , Aptoide
27
27
28
28
29
29
def search_apkmirror (query : str ) -> str :
30
30
apkmirror = APKMirror (query )
31
31
result = apkmirror .search_apk ()
32
32
if result :
33
33
title , apk_link = result
34
- return f"<b>{ title } </b>:{ apk_link } "
35
- return "<code>No results found</code>"
34
+ return f"APKMirror: \n <b>{ title } </b>:{ apk_link } "
35
+ return "APKMirror: <code>No results found</code>"
36
36
37
37
38
38
def search_apkpure (query : str ) -> str :
39
39
apkpure = APKPure (query )
40
40
result = apkpure .search_apk ()
41
41
if result :
42
42
title , apk_link = result
43
- return f"<b>{ title } </b>:{ apk_link } "
44
- return "<code>No results found</code>"
43
+ return f"APKPure: \n <b>{ title } </b>:{ apk_link } "
44
+ return "APKPure: <code>No results found</code>"
45
45
46
46
47
47
def search_appteka (query : str ) -> str :
48
48
appteka = AppTeka (query )
49
49
result = appteka .search_apk ()
50
50
if result :
51
51
title , apk_link = result
52
- return f"<b>{ title } </b>:{ apk_link } "
53
- return "<code>No results found</code>"
52
+ return f"AppTeka: \n <b>{ title } </b>:{ apk_link } "
53
+ return "AppTeka: <code>No results found</code>"
54
54
55
55
56
56
def search_apkcombo (query : str ) -> str :
57
57
apkcombo = APKCombo (query )
58
58
result = apkcombo .search_apk ()
59
59
if result :
60
60
title , apk_link = result
61
- return f"<b>{ title } </b>:{ apk_link } "
62
- return "<code>No results found</code>"
61
+ return f"APKCombo: \n <b>{ title } </b>:{ apk_link } "
62
+ return "APKCombo: <code>No results found</code>"
63
63
64
64
65
65
def search_apkfab (query : str ) -> str :
66
66
apkfab = APKFab (query )
67
67
result = apkfab .search_apk ()
68
68
if result :
69
69
title , apk_link = result
70
- return f"<b>{ title } </b>:{ apk_link } "
71
- return "<code>No results found</code>"
70
+ return f"APKFab:\n <b>{ title } </b>:{ apk_link } "
71
+ return "APKFab:<code>No results found</code>"
72
+
73
+
74
+ def search_apkad (query : str ) -> str :
75
+ apkad = APKad (query )
76
+ result = apkad .search_apk ()
77
+ if result :
78
+ title , apk_link = result
79
+ return f"APKad:\n <b>{ title } </b>:{ apk_link } "
80
+ return "APKad:<code>No results found</code>"
81
+
82
+
83
+ def search_aptoide (query : str ) -> str :
84
+ aptoide = Aptoide (query )
85
+ result = aptoide .search_apk ()
86
+ if result :
87
+ title , apk_link = result
88
+ return f"Aptoide:\n <b>{ title } </b>:{ apk_link } "
89
+ return "Aptoide:<code>No results found</code>"
72
90
73
91
74
92
def apksearch (query : str ) -> str :
@@ -77,12 +95,16 @@ def apksearch(query: str) -> str:
77
95
appteka_result = search_appteka (query )
78
96
apkcombo_result = search_apkcombo (query )
79
97
apkfab_result = search_apkfab (query )
98
+ apkad_result = search_apkad (query )
99
+ aptoide_result = search_aptoide (query )
80
100
results = [
81
101
apkmirror_result ,
82
102
apkpure_result ,
83
103
appteka_result ,
84
104
apkcombo_result ,
85
105
apkfab_result ,
106
+ apkad_result ,
107
+ aptoide_result ,
86
108
]
87
109
return "\n \n " .join (results )
88
110
@@ -132,11 +154,30 @@ async def appteka(_, message: Message):
132
154
await message .edit_text (result , disable_web_page_preview = True )
133
155
134
156
157
+ @Client .on_message (filters .command ("apkad" , prefix ) & filters .me )
158
+ async def appteka (_ , message : Message ):
159
+ if len (message .command ) > 2 :
160
+ return await message .edit ("<code>No query provided</code>" )
161
+ query = message .text .split (maxsplit = 1 )[1 ]
162
+ result = search_apkad (query )
163
+ await message .edit_text (result , disable_web_page_preview = True )
164
+
165
+
166
+ @Client .on_message (filters .command ("aptoide" , prefix ) & filters .me )
167
+ async def appteka (_ , message : Message ):
168
+ if len (message .command ) > 2 :
169
+ return await message .edit ("<code>No query provided</code>" )
170
+ query = message .text .split (maxsplit = 1 )[1 ]
171
+ result = search_aptoide (query )
172
+ await message .edit_text (result , disable_web_page_preview = True )
173
+
174
+
135
175
@Client .on_message (filters .command ("apksearch" , prefix ) & filters .me )
136
176
async def apks (_ , message : Message ):
137
177
if len (message .command ) > 2 :
138
178
return await message .edit ("<code>No query provided</code>" )
139
179
query = message .text .split (maxsplit = 1 )[1 ]
180
+ await message .edit ("<code>Searching...</code>" )
140
181
result = apksearch (query )
141
182
await message .edit_text (result , disable_web_page_preview = True )
142
183
@@ -147,5 +188,7 @@ async def apks(_, message: Message):
147
188
"appteka [package_name]*" : "Search for an apk on appteka" ,
148
189
"apksearch [package_name]*" : "Search for an apk on apksearch" ,
149
190
"apkpure [package_name]*" : "Search for an apk on apkpure" ,
191
+ "aptoide [package_name]*" : "Search for an apk on aptoide" ,
192
+ "apkad [package_name]*" : "Search for an apk on apkad" ,
150
193
"apksearch [package_name]*" : "Search for an apk on all supported sources" ,
151
194
}
0 commit comments