LoremPizza commited on
Commit
cef8f87
·
verified ·
1 Parent(s): d85fcb6

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +4 -5
test.py CHANGED
@@ -131,13 +131,13 @@ async def get_film():
131
 
132
 
133
 
134
- @app.get('/proxy/{path:segment}')
135
- def proxy_m3u8(segment: str):
136
  # Base URL of the original M3U8
137
  base_url = "https://vixcloud.co/playlist/"
138
 
139
- # Append requested segment
140
- full_url = f"{base_url}{segment}?{request.query_string.decode('utf-8')}"
141
 
142
  # Fetch the requested content
143
  headers = {'User-Agent': 'Mozilla/5.0'} # Add headers if required
@@ -154,7 +154,6 @@ def proxy_m3u8(segment: str):
154
 
155
 
156
 
157
-
158
 
159
 
160
  if __name__ == "__main__":
 
131
 
132
 
133
 
134
+ @app.get('/proxy/{path}')
135
+ def proxy_m3u8(path: str, request: Request):
136
  # Base URL of the original M3U8
137
  base_url = "https://vixcloud.co/playlist/"
138
 
139
+ # Append requested path segment
140
+ full_url = f"{base_url}{path}?{request.query_string.decode('utf-8')}"
141
 
142
  # Fetch the requested content
143
  headers = {'User-Agent': 'Mozilla/5.0'} # Add headers if required
 
154
 
155
 
156
 
 
157
 
158
 
159
  if __name__ == "__main__":