refactor: update query handling in Node class
This commit is contained in:
parent
b3795102b8
commit
ad01407fff
|
|
@ -14,7 +14,7 @@ repos:
|
||||||
rev: 23.10.1
|
rev: 23.10.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
language_version: python3.11
|
language_version: python3.12
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.15.0
|
rev: v3.15.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
@ -28,10 +28,6 @@ repos:
|
||||||
rev: v3.1.0
|
rev: v3.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: add-trailing-comma
|
- id: add-trailing-comma
|
||||||
- repo: https://github.com/hadialqattan/pycln
|
|
||||||
rev: v2.3.0
|
|
||||||
hooks:
|
|
||||||
- id: pycln
|
|
||||||
|
|
||||||
default_language_version:
|
default_language_version:
|
||||||
python: python3.11
|
python: python3.12
|
||||||
|
|
|
||||||
|
|
@ -704,7 +704,7 @@ class Node:
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not URLRegex.BASE_URL.match(query) and not re.match(r"(?:ytm?|sc)search:.", query):
|
if not URLRegex.BASE_URL.match(query) and not re.match(r"(?:[a-z]+?)search:.", query):
|
||||||
query = f"{search_type}:{query}"
|
query = f"{search_type}:{query}"
|
||||||
|
|
||||||
# If YouTube url contains a timestamp, capture it for use later.
|
# If YouTube url contains a timestamp, capture it for use later.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue