xhamster_api 2.0__tar.gz → 2.1__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.
- {xhamster_api-2.0 → xhamster_api-2.1}/PKG-INFO +1 -1
- {xhamster_api-2.0 → xhamster_api-2.1}/pyproject.toml +1 -1
- {xhamster_api-2.0 → xhamster_api-2.1}/xhamster_api/xhamster_api.py +9 -9
- {xhamster_api-2.0 → xhamster_api-2.1}/LICENSE +0 -0
- {xhamster_api-2.0 → xhamster_api-2.1}/README.md +0 -0
- {xhamster_api-2.0 → xhamster_api-2.1}/xhamster_api/__init__.py +0 -0
- {xhamster_api-2.0 → xhamster_api-2.1}/xhamster_api/modules/__init__.py +0 -0
- {xhamster_api-2.0 → xhamster_api-2.1}/xhamster_api/modules/consts.py +0 -0
- {xhamster_api-2.0 → xhamster_api-2.1}/xhamster_api/modules/errors.py +0 -0
- {xhamster_api-2.0 → xhamster_api-2.1}/xhamster_api/modules/type_hints.py +0 -0
- {xhamster_api-2.0 → xhamster_api-2.1}/xhamster_api/tests/__init__.py +0 -0
- {xhamster_api-2.0 → xhamster_api-2.1}/xhamster_api/tests/test_all.py +0 -0
|
@@ -30,7 +30,7 @@ except (ModuleNotFoundError, ImportError):
|
|
|
30
30
|
parser = "html.parser"
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
async def get_html_content(core: BaseCore, url: str) -> str | None:
|
|
33
|
+
async def get_html_content(core: BaseCore, url: str) -> str | None | dict:
|
|
34
34
|
# What should I do here?
|
|
35
35
|
try:
|
|
36
36
|
content = await core.fetch(url)
|
|
@@ -41,17 +41,17 @@ async def get_html_content(core: BaseCore, url: str) -> str | None:
|
|
|
41
41
|
if content.status_code == 404:
|
|
42
42
|
raise NotFound(f"Server returned 404 for: {url}")
|
|
43
43
|
|
|
44
|
-
except NetworkingError:
|
|
45
|
-
raise NetworkError from
|
|
44
|
+
except NetworkingError as e:
|
|
45
|
+
raise NetworkError(str(e)) from e
|
|
46
46
|
|
|
47
|
-
except InvalidProxy:
|
|
48
|
-
raise ProxyError from
|
|
47
|
+
except InvalidProxy as e:
|
|
48
|
+
raise ProxyError(str(e)) from e
|
|
49
49
|
|
|
50
|
-
except BotProtectionDetected:
|
|
51
|
-
raise BotDetection from
|
|
50
|
+
except BotProtectionDetected as e:
|
|
51
|
+
raise BotDetection(str(e)) from e
|
|
52
52
|
|
|
53
|
-
except UnknownError:
|
|
54
|
-
raise UnknownNetworkError from
|
|
53
|
+
except UnknownError as e:
|
|
54
|
+
raise UnknownNetworkError(str(e)) from e
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
class Something(Helper):
|
|
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
|