quasarr 1.26.5__py3-none-any.whl → 1.26.6__py3-none-any.whl
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.
Potentially problematic release.
This version of quasarr might be problematic. Click here for more details.
- quasarr/__init__.py +39 -4
- quasarr/api/arr/__init__.py +2 -1
- quasarr/providers/version.py +1 -1
- {quasarr-1.26.5.dist-info → quasarr-1.26.6.dist-info}/METADATA +1 -1
- {quasarr-1.26.5.dist-info → quasarr-1.26.6.dist-info}/RECORD +9 -9
- {quasarr-1.26.5.dist-info → quasarr-1.26.6.dist-info}/WHEEL +0 -0
- {quasarr-1.26.5.dist-info → quasarr-1.26.6.dist-info}/entry_points.txt +0 -0
- {quasarr-1.26.5.dist-info → quasarr-1.26.6.dist-info}/licenses/LICENSE +0 -0
- {quasarr-1.26.5.dist-info → quasarr-1.26.6.dist-info}/top_level.txt +0 -0
quasarr/__init__.py
CHANGED
|
@@ -10,8 +10,9 @@ import socket
|
|
|
10
10
|
import sys
|
|
11
11
|
import tempfile
|
|
12
12
|
import time
|
|
13
|
-
from urllib.parse import urlparse
|
|
13
|
+
from urllib.parse import urlparse, urljoin, parse_qs
|
|
14
14
|
|
|
15
|
+
import dukpy
|
|
15
16
|
import requests
|
|
16
17
|
|
|
17
18
|
from quasarr.api import get_api
|
|
@@ -117,16 +118,21 @@ def run():
|
|
|
117
118
|
print("\n===== Hostnames =====")
|
|
118
119
|
try:
|
|
119
120
|
if arguments.hostnames:
|
|
120
|
-
hostnames_link =
|
|
121
|
-
|
|
121
|
+
hostnames_link = arguments.hostnames
|
|
122
122
|
if is_valid_url(hostnames_link):
|
|
123
|
+
if "pastebin.com" in hostnames_link:
|
|
124
|
+
hostnames_link = make_raw_pastebin_link(hostnames_link)
|
|
125
|
+
|
|
123
126
|
print(f"Extracting hostnames from {hostnames_link}...")
|
|
124
127
|
allowed_keys = supported_hostnames
|
|
125
128
|
max_keys = len(allowed_keys)
|
|
126
129
|
shorthand_list = ', '.join(
|
|
127
130
|
[f'"{key}"' for key in allowed_keys[:-1]]) + ' and ' + f'"{allowed_keys[-1]}"'
|
|
128
131
|
print(f'There are up to {max_keys} hostnames currently supported: {shorthand_list}')
|
|
129
|
-
|
|
132
|
+
if "/ini.html" in hostnames_link:
|
|
133
|
+
data = build_ini_from_ini_html(hostnames_link)
|
|
134
|
+
else:
|
|
135
|
+
data = requests.get(hostnames_link).text
|
|
130
136
|
results = extract_kv_pairs(data, allowed_keys)
|
|
131
137
|
|
|
132
138
|
extracted_hostnames = 0
|
|
@@ -413,6 +419,35 @@ def make_raw_pastebin_link(url):
|
|
|
413
419
|
return url # Not a Pastebin link, return unchanged
|
|
414
420
|
|
|
415
421
|
|
|
422
|
+
def build_ini_from_ini_html(url: str) -> str:
|
|
423
|
+
def get(u: str) -> str:
|
|
424
|
+
r = requests.get(u, timeout=10)
|
|
425
|
+
r.raise_for_status()
|
|
426
|
+
return r.text
|
|
427
|
+
|
|
428
|
+
parsed = urlparse(url)
|
|
429
|
+
params = parse_qs(parsed.query)
|
|
430
|
+
|
|
431
|
+
data_js = get(urljoin(f"{parsed.scheme}://{parsed.netloc}", "data.js"))
|
|
432
|
+
|
|
433
|
+
hostnames = dukpy.evaljs("""
|
|
434
|
+
var window = {};
|
|
435
|
+
%s
|
|
436
|
+
window.HOSTNAMES;
|
|
437
|
+
""" % data_js)
|
|
438
|
+
|
|
439
|
+
excluded = set()
|
|
440
|
+
if "exclude" in params:
|
|
441
|
+
excluded = set(params["exclude"][0].split(","))
|
|
442
|
+
|
|
443
|
+
lines = []
|
|
444
|
+
for h in hostnames:
|
|
445
|
+
if h["key"] not in excluded:
|
|
446
|
+
lines.append(f"{h['key']} = {h['name']}")
|
|
447
|
+
|
|
448
|
+
return "\n".join(lines) + "\n"
|
|
449
|
+
|
|
450
|
+
|
|
416
451
|
def is_valid_url(url):
|
|
417
452
|
if "https://pastebin.com/raw/eX4Mpl3" in url:
|
|
418
453
|
print("Example URL detected. Please provide a valid URL found on pastebin or another public site!")
|
quasarr/api/arr/__init__.py
CHANGED
|
@@ -353,7 +353,8 @@ def setup_arr_routes(app):
|
|
|
353
353
|
<enclosure url="{release.get("link", "")}" length="{release.get("size", 0)}" type="application/x-nzb" />
|
|
354
354
|
</item>'''
|
|
355
355
|
|
|
356
|
-
|
|
356
|
+
is_feed_request = not getattr(request.query, 'imdbid', '')
|
|
357
|
+
if is_feed_request and not items:
|
|
357
358
|
items = f'''
|
|
358
359
|
<item>
|
|
359
360
|
<title>No results found</title>
|
quasarr/providers/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
quasarr/__init__.py,sha256=
|
|
1
|
+
quasarr/__init__.py,sha256=BslVqfYcaIHJ-oE96ZvRN-7fLCs4cg8LqYwS19u06Kg,19133
|
|
2
2
|
quasarr/api/__init__.py,sha256=9Y_DTNYsHeimrXL3mAli8OUg0zqo7QGLF2ft40d3R-c,6822
|
|
3
|
-
quasarr/api/arr/__init__.py,sha256
|
|
3
|
+
quasarr/api/arr/__init__.py,sha256=6CFASudVLlqKVNhTnS72Np2T3uAMsJXE-8u0986WW9c,17460
|
|
4
4
|
quasarr/api/captcha/__init__.py,sha256=IhJVn9iWtb01P2yfoqtOF7wSsiXizES7HNn29BX1uHk,60268
|
|
5
5
|
quasarr/api/config/__init__.py,sha256=0K7zqC9dt39Ul1RIJt0zNVdh1b9ARnfC6QFPa2D9FCw,819
|
|
6
6
|
quasarr/api/sponsors_helper/__init__.py,sha256=kAZabPlplPYRG6Uw7ZHTk5uypualwvhs-NoTOjQhhhA,6369
|
|
@@ -39,7 +39,7 @@ quasarr/providers/notifications.py,sha256=bohT-6yudmFnmZMc3BwCGX0n1HdzSVgQG_LDZm
|
|
|
39
39
|
quasarr/providers/obfuscated.py,sha256=xPI3WrteOiZN5BgNDp0CURcYfkRrdnRCz_cT7BpzIJU,1363310
|
|
40
40
|
quasarr/providers/shared_state.py,sha256=-TIiH2lkCfovq7bzUZicpUjXEjS87ZHCcevsFgySOqw,29944
|
|
41
41
|
quasarr/providers/statistics.py,sha256=cEQixYnDMDqtm5wWe40E_2ucyo4mD0n3SrfelhQi1L8,6452
|
|
42
|
-
quasarr/providers/version.py,sha256=
|
|
42
|
+
quasarr/providers/version.py,sha256=zYvFuXh_gULofghR4rNtgM1zf9PIjQ0lywLhM41ee74,4004
|
|
43
43
|
quasarr/providers/web_server.py,sha256=AYd0KRxdDWMBr87BP8wlSMuL4zZo0I_rY-vHBai6Pfg,1688
|
|
44
44
|
quasarr/providers/sessions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
45
|
quasarr/providers/sessions/al.py,sha256=F1d76eAJcbTvb6YvAIlQ4gfrYC_256QAKiWEQcuWe8k,10612
|
|
@@ -69,9 +69,9 @@ quasarr/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
69
69
|
quasarr/storage/config.py,sha256=hOI7vvIo1YaML3dtAkTmp0HSedWF6brVhRk3d8pJtXI,6300
|
|
70
70
|
quasarr/storage/setup.py,sha256=V_dWfyCYxRE_ahmBtD-DmHOKP2L6brBcVYydPRcHjns,21448
|
|
71
71
|
quasarr/storage/sqlite_database.py,sha256=yMqFQfKf0k7YS-6Z3_7pj4z1GwWSXJ8uvF4IydXsuTE,3554
|
|
72
|
-
quasarr-1.26.
|
|
73
|
-
quasarr-1.26.
|
|
74
|
-
quasarr-1.26.
|
|
75
|
-
quasarr-1.26.
|
|
76
|
-
quasarr-1.26.
|
|
77
|
-
quasarr-1.26.
|
|
72
|
+
quasarr-1.26.6.dist-info/licenses/LICENSE,sha256=QQFCAfDgt7lSA8oSWDHIZ9aTjFbZaBJdjnGOHkuhK7k,1060
|
|
73
|
+
quasarr-1.26.6.dist-info/METADATA,sha256=M7gOmlAC-bEd8ZoJIhQ8AeRhPSkeHspdavJMp4pYI7o,12805
|
|
74
|
+
quasarr-1.26.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
75
|
+
quasarr-1.26.6.dist-info/entry_points.txt,sha256=gXi8mUKsIqKVvn-bOc8E5f04sK_KoMCC-ty6b2Hf-jc,40
|
|
76
|
+
quasarr-1.26.6.dist-info/top_level.txt,sha256=dipJdaRda5ruTZkoGfZU60bY4l9dtPlmOWwxK_oGSF0,8
|
|
77
|
+
quasarr-1.26.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|