Skip to content

Commit 0afb1a9

Browse files
committed
- fixed json decode error (finally)
1 parent 8e574e7 commit 0afb1a9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

eporner_api/eporner_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def extract_json_from_html(self):
187187
for script in script_tags:
188188
json_text = script.string.strip()
189189
try:
190-
data = json.loads(json_text)
190+
data = json.loads(json_text, strict=False)
191191

192192
except json.decoder.JSONDecodeError:
193193
raise InvalidVideo("""
@@ -516,6 +516,7 @@ def search_videos(self, query: str, sorting_gay: Union[str, Gay], sorting_order:
516516
json_data = json.loads(response)
517517
for video_ in json_data.get("videos", []): # Don't know why this works lmao
518518
id_ = video_["url"]
519+
print(id_)
519520
yield Video(id_, enable_html_scraping, core=self.core)
520521

521522
def get_videos_by_category(self, category: Union[str, Category], enable_html_scraping: bool = False)\

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "Eporner_API"
7-
version = "1.9.0"
7+
version = "1.9.1"
88
description = "A Python API for the Porn Site Eporner.com"
99
readme = "README.md"
1010
requires-python = ">=3.6"

0 commit comments

Comments
 (0)