quasarr 1.17.0__py3-none-any.whl → 1.17.2__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.

@@ -105,28 +105,45 @@ def setup_captcha_routes(app):
105
105
  """Render the bypass UI section for both cutcaptcha and circle captcha pages"""
106
106
  return f'''
107
107
  <div style="margin-top: 40px; padding-top: 20px; border-top: 2px solid #ccc;">
108
- <h3>Bypass CAPTCHA</h3>
109
- <a href="{url}" target="_blank">Protected Link</a>
110
- <form id="bypass-form" action="/captcha/bypass-submit" method="post" enctype="multipart/form-data">
111
- <input type="hidden" name="package_id" value="{package_id}" />
112
- <input type="hidden" name="title" value="{title}" />
113
- <input type="hidden" name="password" value="{password}" />
114
-
115
- <div style="margin-bottom: 15px;">
116
- <label for="links-input"><b>Paste direct download links (one per line):</b></label><br>
117
- <textarea id="links-input" name="links" rows="5" style="width: 100%; padding: 8px; font-family: monospace; resize: vertical;"></textarea>
118
- </div>
119
-
120
- <div style="margin-bottom: 15px;">
121
- <label for="dlc-file"><b>Or upload DLC file:</b></label><br>
122
- <input type="file" id="dlc-file" name="dlc_file" accept=".dlc" />
123
- </div>
124
-
125
- <div>
126
- {render_button("Submit Bypass", "primary", {"type": "submit"})}
127
- </div>
128
- </form>
108
+ <details id="bypassDetails">
109
+ <summary id="bypassSummary">Show CAPTCHA Bypass</summary><br>
110
+ <strong><a href="{url}" target="_blank">Obtain download links here!</a></strong><br><br>
111
+ <form id="bypass-form" action="/captcha/bypass-submit" method="post" enctype="multipart/form-data">
112
+ <input type="hidden" name="package_id" value="{package_id}" />
113
+ <input type="hidden" name="title" value="{title}" />
114
+ <input type="hidden" name="password" value="{password}" />
115
+
116
+ <div>
117
+ <strong>Paste the download links (one per line):</strong>
118
+ <textarea id="links-input" name="links" rows="5" style="width: 100%; padding: 8px; font-family: monospace; resize: vertical;"></textarea>
119
+ </div>
120
+
121
+ <div>
122
+ <strong>Or upload DLC file:</strong><br>
123
+ <input type="file" id="dlc-file" name="dlc_file" accept=".dlc" />
124
+ </div>
125
+
126
+ <div>
127
+ {render_button("Submit", "primary", {"type": "submit"})}
128
+ </div>
129
+ </form>
130
+ </details>
129
131
  </div>
132
+ <script>
133
+ // Handle bypass toggle
134
+ const bypassDetails = document.getElementById('bypassDetails');
135
+ const bypassSummary = document.getElementById('bypassSummary');
136
+
137
+ if (bypassDetails && bypassSummary) {{
138
+ bypassDetails.addEventListener('toggle', () => {{
139
+ if (bypassDetails.open) {{
140
+ bypassSummary.textContent = 'Hide CAPTCHA Bypass';
141
+ }} else {{
142
+ bypassSummary.textContent = 'Show CAPTCHA Bypass';
143
+ }}
144
+ }});
145
+ }}
146
+ </script>
130
147
  '''
131
148
 
132
149
  @app.get('/captcha/delete/<package_id>')
@@ -285,7 +302,6 @@ def setup_captcha_routes(app):
285
302
  <div>
286
303
  <h1><img src="{images.logo}" type="image/png" alt="Quasarr logo" class="logo"/>Quasarr</h1>
287
304
  <p id="package-title" style="max-width: 370px; word-wrap: break-word; overflow-wrap: break-word;"><b>Package:</b> {title}</p>
288
- <h3>Solve CAPTCHA</h3>
289
305
  <div id="captcha-key"></div>
290
306
  {link_select}<br><br>
291
307
  <input type="hidden" id="link-hidden" value="{prioritized_links[0][0]}" />
@@ -408,8 +424,11 @@ def setup_captcha_routes(app):
408
424
  # Process links input
409
425
  if links_input:
410
426
  info(f"Processing direct links bypass for {title}")
411
- links = [link.strip() for link in links_input.split('\n') if link.strip()]
412
- info(f"Received {len(links)} direct download links")
427
+ raw_links = [link.strip() for link in links_input.split('\n') if link.strip()]
428
+ links = [l for l in raw_links if l.lower().startswith(("http://", "https://"))]
429
+
430
+ info(f"Received {len(links)} valid direct download links "
431
+ f"(from {len(raw_links)} provided)")
413
432
 
414
433
  # Process DLC file
415
434
  elif dlc_upload:
@@ -590,7 +609,6 @@ def setup_captcha_routes(app):
590
609
  <body>
591
610
  <h1><img src="{images.logo}" type="image/png" alt="Quasarr logo" class="logo"/>Quasarr</h1>
592
611
  <p><b>Package:</b> {title}</p>
593
- <h3>Solve CAPTCHA</h3>
594
612
  <form action="/captcha/decrypt-filecrypt-circle?url={url}&session_id={session_id}&package_id={package_id}" method="post">
595
613
  <input type="image" src="/captcha/circle.php?url={url}&session_id={session_id}" name="button" alt="Circle CAPTCHA">
596
614
  </form>
@@ -4,6 +4,7 @@
4
4
 
5
5
  import concurrent.futures
6
6
  import re
7
+ import time
7
8
  from urllib.parse import urlparse
8
9
 
9
10
  import requests
@@ -39,6 +40,7 @@ def get_by_download_links(shared_state, url, mirror, title): # signature must a
39
40
  r = requests.get(url, headers=headers, timeout=10)
40
41
  return r.text, url
41
42
  except Exception:
43
+ info(f"Error fetching iframe URL: {url}")
42
44
  return None, url
43
45
 
44
46
  with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
@@ -76,23 +78,26 @@ def get_by_download_links(shared_state, url, mirror, title): # signature must a
76
78
  try:
77
79
  r = requests.get(href, headers=headers, timeout=10, allow_redirects=True)
78
80
  if "/404.html" in r.url:
79
- debug(f"Link leads to 404 page for {hostname}: {r.url}")
81
+ info(f"Link leads to 404 page for {hostname}: {r.url}")
80
82
  return None
83
+ time.sleep(1)
81
84
  return r.url
82
85
  except Exception as e:
83
- debug(f"Error resolving link for {hostname}: {e}")
86
+ info(f"Error resolving link for {hostname}: {e}")
84
87
  return None
85
88
 
86
- with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
87
- future_to_hostname = {executor.submit(resolve_redirect, pair): pair[1] for pair in url_hosters}
88
- for future in concurrent.futures.as_completed(future_to_hostname):
89
- resolved_url = future.result()
90
- hostname = future_to_hostname[future]
91
- if not hostname:
92
- hostname = urlparse(resolved_url).hostname
93
- if resolved_url and hostname and hostname.startswith(("ddownload", "rapidgator", "turbobit")):
94
- (links.insert(0, [resolved_url, hostname]) if "rapidgator" in hostname
95
- else links.append([resolved_url, hostname]))
89
+ for pair in url_hosters:
90
+ resolved_url = resolve_redirect(pair)
91
+ hostname = pair[1]
92
+
93
+ if not hostname:
94
+ hostname = urlparse(resolved_url).hostname
95
+
96
+ if resolved_url and hostname and hostname.startswith(("ddownload", "rapidgator", "turbobit", "filecrypt")):
97
+ if "rapidgator" in hostname:
98
+ links.insert(0, [resolved_url, hostname])
99
+ else:
100
+ links.append([resolved_url, hostname])
96
101
 
97
102
 
98
103
  except Exception as e:
@@ -8,7 +8,7 @@ import requests
8
8
 
9
9
 
10
10
  def get_version():
11
- return "1.17.0"
11
+ return "1.17.2"
12
12
 
13
13
 
14
14
  def get_latest_version():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quasarr
3
- Version: 1.17.0
3
+ Version: 1.17.2
4
4
  Summary: Quasarr connects JDownloader with Radarr, Sonarr and LazyLibrarian. It also decrypts links protected by CAPTCHAs.
5
5
  Home-page: https://github.com/rix1337/Quasarr
6
6
  Author: rix1337
@@ -1,7 +1,7 @@
1
1
  quasarr/__init__.py,sha256=_WoDFvqXXilQynsiPrY-SXyADy1OwhAjQkdaJFqqHo0,17873
2
2
  quasarr/api/__init__.py,sha256=9Y_DTNYsHeimrXL3mAli8OUg0zqo7QGLF2ft40d3R-c,6822
3
3
  quasarr/api/arr/__init__.py,sha256=HrzyavxsCmQkdV2SMqQSoJq3KgrsPBnQJdo5iyovmG8,16626
4
- quasarr/api/captcha/__init__.py,sha256=EGXuhsks87w6gbj6RbupXuxhOMD3G9dl4zwwJ_U_8ck,32982
4
+ quasarr/api/captcha/__init__.py,sha256=1-P9MXoYDu1EQuEt6rpsIM4sRPbSXIrT30f_ChAKaHk,33818
5
5
  quasarr/api/config/__init__.py,sha256=0K7zqC9dt39Ul1RIJt0zNVdh1b9ARnfC6QFPa2D9FCw,819
6
6
  quasarr/api/sponsors_helper/__init__.py,sha256=kAZabPlplPYRG6Uw7ZHTk5uypualwvhs-NoTOjQhhhA,6369
7
7
  quasarr/api/statistics/__init__.py,sha256=NrBAjjHkIUE95HhPUGIfNqh2IqBqJ_zm00S90Y-Qnus,7038
@@ -13,7 +13,7 @@ quasarr/downloads/linkcrypters/hide.py,sha256=kMxjsYZJpC1V3jwYv9b0h4HKBIectLlggl
13
13
  quasarr/downloads/packages/__init__.py,sha256=C-6b_IgKQsmQWo5onTqFqx2pCOvPkT0oH-7jiopa8Hk,16748
14
14
  quasarr/downloads/sources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  quasarr/downloads/sources/al.py,sha256=Ulc4fTuX8_gOHeTJzZYEAgUCiFPoyczIdbZh6qA3jzM,26180
16
- quasarr/downloads/sources/by.py,sha256=ovVhZPwi2IJUeUTIWuBfS5MyCWNpE3-drhGUQ4BPKs0,3816
16
+ quasarr/downloads/sources/by.py,sha256=VzytGYyy81vjsvNJabohoK8PkjYTKCwXM1TjeD3Ker0,3695
17
17
  quasarr/downloads/sources/dd.py,sha256=EQ823wrVusVCVJhh9Rdf67-Yae9XYio8Uj_HW_y5qO0,2841
18
18
  quasarr/downloads/sources/dt.py,sha256=fzAyJy8nmqTAFRObvaRbvsXdBkCo5JuojCJYQMYuPOs,2108
19
19
  quasarr/downloads/sources/dw.py,sha256=15UH-kBZt06GS5CDi-TTJGV_H59mQO0Nl-y3nYA5kOk,2504
@@ -33,7 +33,7 @@ quasarr/providers/notifications.py,sha256=bohT-6yudmFnmZMc3BwCGX0n1HdzSVgQG_LDZm
33
33
  quasarr/providers/obfuscated.py,sha256=XfiEblJizqixUoA4MIsillr5Nh1dwFqCgLvBQWM7Lwo,193865
34
34
  quasarr/providers/shared_state.py,sha256=4nswf5AuA4c1DWqSXsX0HXwlDt5e-UUUvQSy-vryCRE,28987
35
35
  quasarr/providers/statistics.py,sha256=cEQixYnDMDqtm5wWe40E_2ucyo4mD0n3SrfelhQi1L8,6452
36
- quasarr/providers/version.py,sha256=G0ZVMRC6n_iv9xlSiAzj6jfWvXrCkN6rfF__BOiB5lw,4004
36
+ quasarr/providers/version.py,sha256=Gk8Sp06635dN-u-8VTsGTVfWc9xrPgLsMxUxCHP5rvI,4004
37
37
  quasarr/providers/web_server.py,sha256=XPj98T-axxgotovuB-rVw1IPCkJiNdXBlEeFvM_zSlM,1432
38
38
  quasarr/providers/sessions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  quasarr/providers/sessions/al.py,sha256=mlP6SWfCY2HyOSV40uyotQ5T4eSBNYG9A5GWOEAdz-c,9589
@@ -56,9 +56,9 @@ quasarr/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  quasarr/storage/config.py,sha256=ISZXh9gHiBu5mYhHGYx8nZ8JyMYuSFqfVl52DiUDJec,5994
57
57
  quasarr/storage/setup.py,sha256=gpHOsc5qtt-M72saZoMJFLE2YlCrjv7FWZknh-iVKsk,17766
58
58
  quasarr/storage/sqlite_database.py,sha256=yMqFQfKf0k7YS-6Z3_7pj4z1GwWSXJ8uvF4IydXsuTE,3554
59
- quasarr-1.17.0.dist-info/licenses/LICENSE,sha256=QQFCAfDgt7lSA8oSWDHIZ9aTjFbZaBJdjnGOHkuhK7k,1060
60
- quasarr-1.17.0.dist-info/METADATA,sha256=pXe5L01d2AqOa9kkhW4OhWNsuYyB1ZSplLwqNrnmkRI,12249
61
- quasarr-1.17.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
62
- quasarr-1.17.0.dist-info/entry_points.txt,sha256=gXi8mUKsIqKVvn-bOc8E5f04sK_KoMCC-ty6b2Hf-jc,40
63
- quasarr-1.17.0.dist-info/top_level.txt,sha256=dipJdaRda5ruTZkoGfZU60bY4l9dtPlmOWwxK_oGSF0,8
64
- quasarr-1.17.0.dist-info/RECORD,,
59
+ quasarr-1.17.2.dist-info/licenses/LICENSE,sha256=QQFCAfDgt7lSA8oSWDHIZ9aTjFbZaBJdjnGOHkuhK7k,1060
60
+ quasarr-1.17.2.dist-info/METADATA,sha256=on2aTl3bjogO2QeTapHj9_NVwmQlagIRZ7vmqSGcR-g,12249
61
+ quasarr-1.17.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
62
+ quasarr-1.17.2.dist-info/entry_points.txt,sha256=gXi8mUKsIqKVvn-bOc8E5f04sK_KoMCC-ty6b2Hf-jc,40
63
+ quasarr-1.17.2.dist-info/top_level.txt,sha256=dipJdaRda5ruTZkoGfZU60bY4l9dtPlmOWwxK_oGSF0,8
64
+ quasarr-1.17.2.dist-info/RECORD,,