arizona-forum-api-async 1.1.2__tar.gz → 1.2__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.
- arizona_forum_api_async-1.2/MANIFEST.in +3 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/PKG-INFO +12 -4
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/README.md +1 -2
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_api_async.egg-info/PKG-INFO +12 -4
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_api_async.egg-info/SOURCES.txt +4 -0
- arizona_forum_api_async-1.2/arizona_forum_async/__pycache__/__init__.cpython-313.pyc +0 -0
- arizona_forum_api_async-1.2/arizona_forum_async/__pycache__/api.cpython-313.pyc +0 -0
- arizona_forum_api_async-1.2/arizona_forum_async/__pycache__/consts.cpython-313.pyc +0 -0
- arizona_forum_api_async-1.2/arizona_forum_async/__pycache__/exceptions.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/api.py +44 -12
- arizona_forum_api_async-1.2/arizona_forum_async/bypass_antibot/__pycache__/__init__.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/bypass_antibot/__pycache__/script.cpython-313.pyc +0 -0
- arizona_forum_api_async-1.2/arizona_forum_async/models/__pycache__/__init__.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/__pycache__/category_object.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/__pycache__/member_object.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/__pycache__/other.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/__pycache__/post_object.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/__pycache__/thread_object.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/pyproject.toml +2 -2
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/setup.py +28 -28
- arizona_forum_api_async-1.1.2/MANIFEST.in +0 -3
- arizona_forum_api_async-1.1.2/arizona_forum_async/bypass_antibot/__pycache__/__init__.cpython-313.pyc +0 -0
- arizona_forum_api_async-1.1.2/arizona_forum_async/models/__pycache__/__init__.cpython-313.pyc +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_api_async.egg-info/dependency_links.txt +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_api_async.egg-info/requires.txt +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_api_async.egg-info/top_level.txt +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/__init__.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/bypass_antibot/__init__.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/bypass_antibot/script.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/consts.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/exceptions.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/__init__.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/category_object.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/member_object.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/other.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/post_object.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/thread_object.py +0 -0
- {arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: arizona-forum-api-async
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2
|
4
4
|
Summary: Асинхронная Python библиотека для взаимодействия с форумом Arizona RP (forum.arizona-rp.com) без необходимости получения API ключа.
|
5
5
|
Home-page: https://github.com/fakelag28/Arizona-Forum-API-Async
|
6
6
|
Author: fakelag28
|
@@ -15,6 +15,15 @@ Requires-Dist: aiohttp-socks
|
|
15
15
|
Requires-Dist: beautifulsoup4
|
16
16
|
Requires-Dist: dukpy
|
17
17
|
Requires-Dist: lxml
|
18
|
+
Dynamic: author
|
19
|
+
Dynamic: author-email
|
20
|
+
Dynamic: classifier
|
21
|
+
Dynamic: description
|
22
|
+
Dynamic: description-content-type
|
23
|
+
Dynamic: home-page
|
24
|
+
Dynamic: requires-dist
|
25
|
+
Dynamic: requires-python
|
26
|
+
Dynamic: summary
|
18
27
|
|
19
28
|
# Arizona Forum API Async
|
20
29
|
|
@@ -68,8 +77,7 @@ pip install arizona-forum-api-async
|
|
68
77
|
|
69
78
|
## Документация и примеры
|
70
79
|
|
71
|
-
* **[
|
72
|
-
* **[Документация оригинальной библиотеки](https://tastybread123.github.io/Arizona-API/arz_api.html):** Документация для оригинальной синхронной библиотеки.
|
80
|
+
* **[Официальная документация](https://docs.fakelag.tech/arz_forum_api/general-info):** Полное руководство по использованию асинхронной версии API.
|
73
81
|
* **[Папка с примерами](https://github.com/fakelag28/Arizona-Forum-API-Async/tree/main/examples):** Практические примеры, демонстрирующие различные возможности библиотеки.
|
74
82
|
|
75
83
|
---
|
@@ -50,8 +50,7 @@ pip install arizona-forum-api-async
|
|
50
50
|
|
51
51
|
## Документация и примеры
|
52
52
|
|
53
|
-
* **[
|
54
|
-
* **[Документация оригинальной библиотеки](https://tastybread123.github.io/Arizona-API/arz_api.html):** Документация для оригинальной синхронной библиотеки.
|
53
|
+
* **[Официальная документация](https://docs.fakelag.tech/arz_forum_api/general-info):** Полное руководство по использованию асинхронной версии API.
|
55
54
|
* **[Папка с примерами](https://github.com/fakelag28/Arizona-Forum-API-Async/tree/main/examples):** Практические примеры, демонстрирующие различные возможности библиотеки.
|
56
55
|
|
57
56
|
---
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: arizona-forum-api-async
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2
|
4
4
|
Summary: Асинхронная Python библиотека для взаимодействия с форумом Arizona RP (forum.arizona-rp.com) без необходимости получения API ключа.
|
5
5
|
Home-page: https://github.com/fakelag28/Arizona-Forum-API-Async
|
6
6
|
Author: fakelag28
|
@@ -15,6 +15,15 @@ Requires-Dist: aiohttp-socks
|
|
15
15
|
Requires-Dist: beautifulsoup4
|
16
16
|
Requires-Dist: dukpy
|
17
17
|
Requires-Dist: lxml
|
18
|
+
Dynamic: author
|
19
|
+
Dynamic: author-email
|
20
|
+
Dynamic: classifier
|
21
|
+
Dynamic: description
|
22
|
+
Dynamic: description-content-type
|
23
|
+
Dynamic: home-page
|
24
|
+
Dynamic: requires-dist
|
25
|
+
Dynamic: requires-python
|
26
|
+
Dynamic: summary
|
18
27
|
|
19
28
|
# Arizona Forum API Async
|
20
29
|
|
@@ -68,8 +77,7 @@ pip install arizona-forum-api-async
|
|
68
77
|
|
69
78
|
## Документация и примеры
|
70
79
|
|
71
|
-
* **[
|
72
|
-
* **[Документация оригинальной библиотеки](https://tastybread123.github.io/Arizona-API/arz_api.html):** Документация для оригинальной синхронной библиотеки.
|
80
|
+
* **[Официальная документация](https://docs.fakelag.tech/arz_forum_api/general-info):** Полное руководство по использованию асинхронной версии API.
|
73
81
|
* **[Папка с примерами](https://github.com/fakelag28/Arizona-Forum-API-Async/tree/main/examples):** Практические примеры, демонстрирующие различные возможности библиотеки.
|
74
82
|
|
75
83
|
---
|
@@ -11,6 +11,10 @@ arizona_forum_async/__init__.py
|
|
11
11
|
arizona_forum_async/api.py
|
12
12
|
arizona_forum_async/consts.py
|
13
13
|
arizona_forum_async/exceptions.py
|
14
|
+
arizona_forum_async/__pycache__/__init__.cpython-313.pyc
|
15
|
+
arizona_forum_async/__pycache__/api.cpython-313.pyc
|
16
|
+
arizona_forum_async/__pycache__/consts.cpython-313.pyc
|
17
|
+
arizona_forum_async/__pycache__/exceptions.cpython-313.pyc
|
14
18
|
arizona_forum_async/bypass_antibot/__init__.py
|
15
19
|
arizona_forum_async/bypass_antibot/script.py
|
16
20
|
arizona_forum_async/bypass_antibot/__pycache__/__init__.cpython-313.pyc
|
Binary file
|
Binary file
|
Binary file
|
@@ -148,6 +148,8 @@ class ArizonaAPI:
|
|
148
148
|
params = {'_xfResponseType': 'json', '_xfToken': token}
|
149
149
|
try:
|
150
150
|
async with self._session.get(url, params=params) as response:
|
151
|
+
if response.status == 403:
|
152
|
+
return Member(self, user_id, None, None, None, [], 0, 0, 0, '#fff')
|
151
153
|
response.raise_for_status()
|
152
154
|
data = await response.json()
|
153
155
|
|
@@ -170,7 +172,7 @@ class ArizonaAPI:
|
|
170
172
|
roles_container = soup.find('div', {'class': 'memberHeader-banners'})
|
171
173
|
if roles_container:
|
172
174
|
for i in roles_container.children:
|
173
|
-
if i.text != '\n': roles.append(i.text.strip())
|
175
|
+
if i.text != '\n': roles.append(i.text.strip())
|
174
176
|
|
175
177
|
try:
|
176
178
|
user_title_tag = soup.find('span', {'class': 'userTitle'})
|
@@ -207,6 +209,11 @@ class ArizonaAPI:
|
|
207
209
|
|
208
210
|
return Member(self, user_id, username, user_title, avatar, roles, messages_count, reactions_count, trophies_count, username_color)
|
209
211
|
|
212
|
+
except aiohttp.ClientResponseError as e:
|
213
|
+
if e.status == 403:
|
214
|
+
return Member(self, user_id, None, None, None, [], 0, 0, 0, '#fff')
|
215
|
+
print(f"Ошибка сети при получении пользователя {user_id}: {e}")
|
216
|
+
return None
|
210
217
|
except aiohttp.ClientError as e:
|
211
218
|
print(f"Ошибка сети при получении пользователя {user_id}: {e}")
|
212
219
|
return None
|
@@ -259,7 +266,13 @@ class ArizonaAPI:
|
|
259
266
|
|
260
267
|
|
261
268
|
create_date_tag = content_soup.find('time')
|
262
|
-
create_date =
|
269
|
+
create_date = 0
|
270
|
+
if create_date_tag and create_date_tag.has_attr('data-time'):
|
271
|
+
data_time_value = create_date_tag['data-time']
|
272
|
+
if data_time_value.isdigit():
|
273
|
+
create_date = int(data_time_value)
|
274
|
+
else:
|
275
|
+
create_date = 0
|
263
276
|
|
264
277
|
prefix_tag = content_h1_soup.find('span', {'class': 'label'})
|
265
278
|
if prefix_tag:
|
@@ -314,11 +327,10 @@ class ArizonaAPI:
|
|
314
327
|
try:
|
315
328
|
creator = await self.get_member(creator_id)
|
316
329
|
except Exception as e:
|
317
|
-
|
330
|
+
creator = Member(self, creator_id, None, None, None, None, None, None, None, None)
|
318
331
|
if not creator:
|
319
332
|
creator = Member(self, creator_id, creator_info_tag.text, None, None, None, None, None, None, None)
|
320
333
|
else:
|
321
|
-
print(f"Не удалось найти информацию о создателе для поста {post_id}")
|
322
334
|
return None
|
323
335
|
|
324
336
|
thread = None
|
@@ -334,7 +346,13 @@ class ArizonaAPI:
|
|
334
346
|
return None
|
335
347
|
|
336
348
|
create_date_tag = post_article.find('time', {'class': 'u-dt'})
|
337
|
-
create_date =
|
349
|
+
create_date = 0
|
350
|
+
if create_date_tag and create_date_tag.has_attr('data-time'):
|
351
|
+
data_time_value = create_date_tag['data-time']
|
352
|
+
if data_time_value.isdigit():
|
353
|
+
create_date = int(data_time_value)
|
354
|
+
else:
|
355
|
+
create_date = 0
|
338
356
|
|
339
357
|
html_content_tag = post_article.find('div', {'class': 'bbWrapper'})
|
340
358
|
html_content = str(html_content_tag) if html_content_tag else ""
|
@@ -368,12 +386,13 @@ class ArizonaAPI:
|
|
368
386
|
creator_tag = post_article.find('a', {'class': 'username'})
|
369
387
|
if creator_tag and creator_tag.has_attr('data-user-id'):
|
370
388
|
creator_id = int(creator_tag['data-user-id'])
|
371
|
-
|
389
|
+
try:
|
390
|
+
creator = await self.get_member(creator_id)
|
391
|
+
except Exception as e:
|
392
|
+
creator = Member(self, creator_id, None, None, None, [], 0, 0, 0, '#fff')
|
372
393
|
if not creator:
|
373
|
-
print(f"Не удалось получить создателя ({creator_id}) для поста профиля {post_id}")
|
374
394
|
return None
|
375
395
|
else:
|
376
|
-
print(f"Не удалось найти ID создателя для поста профиля {post_id}")
|
377
396
|
return None
|
378
397
|
|
379
398
|
profile_owner = None
|
@@ -392,7 +411,14 @@ class ArizonaAPI:
|
|
392
411
|
return None
|
393
412
|
|
394
413
|
create_date_tag = post_article.find('time')
|
395
|
-
create_date =
|
414
|
+
create_date = 0
|
415
|
+
if create_date_tag and create_date_tag.has_attr('data-time'):
|
416
|
+
data_time_value = create_date_tag['data-time']
|
417
|
+
if data_time_value.isdigit():
|
418
|
+
create_date = int(data_time_value)
|
419
|
+
else:
|
420
|
+
create_date = 0
|
421
|
+
|
396
422
|
|
397
423
|
html_content_tag = post_article.find('div', {'class': 'bbWrapper'})
|
398
424
|
html_content = str(html_content_tag) if html_content_tag else ""
|
@@ -450,9 +476,12 @@ class ArizonaAPI:
|
|
450
476
|
latest_member_link = latest_member_dl.find('a', {'data-user-id': True})
|
451
477
|
if latest_member_link and latest_member_link.has_attr('data-user-id'):
|
452
478
|
last_user_id = int(latest_member_link['data-user-id'])
|
453
|
-
|
479
|
+
try:
|
480
|
+
last_register_member = await self.get_member(last_user_id)
|
481
|
+
except Exception as e:
|
482
|
+
last_register_member = Member(self, last_user_id, None, None, None, [], 0, 0, 0, '#fff')
|
454
483
|
except (AttributeError, ValueError, Exception) as e:
|
455
|
-
|
484
|
+
pass
|
456
485
|
|
457
486
|
|
458
487
|
return Statistic(self, threads_count, posts_count, users_count, last_register_member)
|
@@ -672,7 +701,10 @@ class ArizonaAPI:
|
|
672
701
|
return None
|
673
702
|
|
674
703
|
parent_category_id = int(parent_category_id_str)
|
675
|
-
|
704
|
+
try:
|
705
|
+
return await self.get_category(parent_category_id)
|
706
|
+
except Exception as e:
|
707
|
+
return None
|
676
708
|
except aiohttp.ClientError as e:
|
677
709
|
print(f"Ошибка сети при получении родительской категории для {category_id}: {e}")
|
678
710
|
return None
|
arizona_forum_api_async-1.2/arizona_forum_async/bypass_antibot/__pycache__/__init__.cpython-313.pyc
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,3 +1,3 @@
|
|
1
|
-
[build-system]
|
2
|
-
requires = ["setuptools>=42", "wheel"]
|
1
|
+
[build-system]
|
2
|
+
requires = ["setuptools>=42", "wheel"]
|
3
3
|
build-backend = "setuptools.build_meta"
|
@@ -1,29 +1,29 @@
|
|
1
|
-
from setuptools import setup, find_packages
|
2
|
-
|
3
|
-
with open("README.md", "r", encoding="utf-8") as fh:
|
4
|
-
long_description = fh.read()
|
5
|
-
|
6
|
-
setup(
|
7
|
-
name="arizona-forum-api-async",
|
8
|
-
version="1.
|
9
|
-
author="fakelag28",
|
10
|
-
author_email="fakelag712@gmail.com",
|
11
|
-
description="Асинхронная Python библиотека для взаимодействия с форумом Arizona RP (forum.arizona-rp.com) без необходимости получения API ключа.",
|
12
|
-
long_description=long_description,
|
13
|
-
long_description_content_type="text/markdown",
|
14
|
-
url="https://github.com/fakelag28/Arizona-Forum-API-Async",
|
15
|
-
packages=find_packages(),
|
16
|
-
classifiers=[
|
17
|
-
"Programming Language :: Python :: 3",
|
18
|
-
"License :: OSI Approved :: MIT License",
|
19
|
-
"Operating System :: OS Independent",
|
20
|
-
],
|
21
|
-
python_requires=">=3.6",
|
22
|
-
install_requires=[
|
23
|
-
"aiohttp",
|
24
|
-
"aiohttp-socks",
|
25
|
-
"beautifulsoup4",
|
26
|
-
"dukpy",
|
27
|
-
"lxml",
|
28
|
-
],
|
1
|
+
from setuptools import setup, find_packages
|
2
|
+
|
3
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
4
|
+
long_description = fh.read()
|
5
|
+
|
6
|
+
setup(
|
7
|
+
name="arizona-forum-api-async",
|
8
|
+
version="1.2",
|
9
|
+
author="fakelag28",
|
10
|
+
author_email="fakelag712@gmail.com",
|
11
|
+
description="Асинхронная Python библиотека для взаимодействия с форумом Arizona RP (forum.arizona-rp.com) без необходимости получения API ключа.",
|
12
|
+
long_description=long_description,
|
13
|
+
long_description_content_type="text/markdown",
|
14
|
+
url="https://github.com/fakelag28/Arizona-Forum-API-Async",
|
15
|
+
packages=find_packages(),
|
16
|
+
classifiers=[
|
17
|
+
"Programming Language :: Python :: 3",
|
18
|
+
"License :: OSI Approved :: MIT License",
|
19
|
+
"Operating System :: OS Independent",
|
20
|
+
],
|
21
|
+
python_requires=">=3.6",
|
22
|
+
install_requires=[
|
23
|
+
"aiohttp",
|
24
|
+
"aiohttp-socks",
|
25
|
+
"beautifulsoup4",
|
26
|
+
"dukpy",
|
27
|
+
"lxml",
|
28
|
+
],
|
29
29
|
)
|
Binary file
|
arizona_forum_api_async-1.1.2/arizona_forum_async/models/__pycache__/__init__.cpython-313.pyc
DELETED
Binary file
|
File without changes
|
File without changes
|
File without changes
|
{arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/exceptions.py
RENAMED
File without changes
|
{arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{arizona_forum_api_async-1.1.2 → arizona_forum_api_async-1.2}/arizona_forum_async/models/other.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|