LoremPizza commited on
Commit
1af4c59
·
verified ·
1 Parent(s): 0f3019c

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +3 -1
test.py CHANGED
@@ -11,7 +11,7 @@ m3u8_content = None
11
 
12
  def fetch_m3u8(url):
13
  """Fetch the M3U8 file from the URL and store it in memory."""
14
- response = requests.get(url,headers = {"User-Agent": User_Agent})
15
  response.raise_for_status() # Raise an error for bad responses
16
  return response.text
17
 
@@ -39,6 +39,8 @@ async def get_version():
39
  random_headers = {}
40
  random_headers['Referer'] = f"https://streamingcommunity.{SC_DOMAIN}/"
41
  random_headers['Origin'] = f"https://streamingcommunity.{SC_DOMAIN}"
 
 
42
  base_url = f'https://streamingcommunity.{SC_DOMAIN}/richiedi-un-titolo'
43
  response = requests.get(base_url, headers=random_headers, allow_redirects = True, proxies = proxies)
44
  #Soup the response
 
11
 
12
  def fetch_m3u8(url):
13
  """Fetch the M3U8 file from the URL and store it in memory."""
14
+ response = requests.get(url,headers = {"User-Agent": User_Agent, "user-agent": User_Agent})
15
  response.raise_for_status() # Raise an error for bad responses
16
  return response.text
17
 
 
39
  random_headers = {}
40
  random_headers['Referer'] = f"https://streamingcommunity.{SC_DOMAIN}/"
41
  random_headers['Origin'] = f"https://streamingcommunity.{SC_DOMAIN}"
42
+ random_headers['User-Agent'] = User_Agent
43
+ random_headers['user-agent'] = User_Agent
44
  base_url = f'https://streamingcommunity.{SC_DOMAIN}/richiedi-un-titolo'
45
  response = requests.get(base_url, headers=random_headers, allow_redirects = True, proxies = proxies)
46
  #Soup the response