Chrunos commited on
Commit
2696fdd
·
verified ·
1 Parent(s): 6e7d250

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -225,7 +225,7 @@ def get_spowload_session_and_token() -> Optional[Tuple[requests.Session, str]]:
225
  A tuple containing the (requests.Session, csrf_token_string) if successful,
226
  otherwise None.
227
  """
228
- spowload_url = "https://spowload.com" # Use https for security
229
  headers = {
230
  # Mimic a common browser user-agent
231
  'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
@@ -427,15 +427,15 @@ async def get_track_download_info(payload: TrackDlRequest):
427
  spowload_session, csrf_token = session_data
428
 
429
  # 2. Prepare request for spowload.com/convert
430
- convert_url = "https://spowload.com/convert"
431
  # Headers are now mostly set on the session, but we need to add the CSRF token
432
  # and ensure Content-Type is set for this specific POST request.
433
  headers = {
434
  'Content-Type': 'application/json',
435
  'X-CSRF-Token': csrf_token,
436
  'Accept': 'application/json, text/plain, */*', # Override default session Accept for API call
437
- 'Referer': 'https://spowload.com/', # Keep Referer
438
- 'Origin': 'https://spowload.com', # Keep Origin
439
  }
440
  # Construct the body exactly as specified
441
  body = {
 
225
  A tuple containing the (requests.Session, csrf_token_string) if successful,
226
  otherwise None.
227
  """
228
+ spowload_url = "https://spowload.cc" # Use https for security
229
  headers = {
230
  # Mimic a common browser user-agent
231
  'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
 
427
  spowload_session, csrf_token = session_data
428
 
429
  # 2. Prepare request for spowload.com/convert
430
+ convert_url = "https://spowload.cc/convert"
431
  # Headers are now mostly set on the session, but we need to add the CSRF token
432
  # and ensure Content-Type is set for this specific POST request.
433
  headers = {
434
  'Content-Type': 'application/json',
435
  'X-CSRF-Token': csrf_token,
436
  'Accept': 'application/json, text/plain, */*', # Override default session Accept for API call
437
+ 'Referer': 'https://spowload.cc/', # Keep Referer
438
+ 'Origin': 'https://spowload.cc', # Keep Origin
439
  }
440
  # Construct the body exactly as specified
441
  body = {