use 'v[0] == "c"' instead of 'v.startswith("c")'

This commit is contained in:
Mike Fährmann
2024-10-15 08:24:06 +02:00
parent d68bb78f44
commit 36883e458e
10 changed files with 24 additions and 20 deletions

View File

@@ -148,8 +148,10 @@ class TsuminoSearchExtractor(TsuminoBase, Extractor):
data["PageNumber"] += 1
def _parse(self, query):
if not query:
return {}
try:
if query.startswith("?"):
if query[0] == "?":
return self._parse_simple(query)
return self._parse_jsurl(query)
except Exception as exc:
@@ -187,8 +189,6 @@ class TsuminoSearchExtractor(TsuminoBase, Extractor):
Example: ~(name~'John*20Doe~age~42~children~(~'Mary~'Bill))
Ref: https://github.com/Sage/jsurl
"""
if not data:
return {}
i = 0
imax = len(data)