Spaces:
Running
Running
v6.1-fix: Fix regex syntax error in mytv extractor
Browse files
main.py
CHANGED
|
@@ -442,7 +442,7 @@ def api_video_url(url:str=Query(...)):
|
|
| 442 |
vtype = "hls" if ".m3u8" in video_src else "video"
|
| 443 |
poster = ""
|
| 444 |
# Try to extract og:image
|
| 445 |
-
og_img = re.search(r'og:image["\'].*?content=["\
|
| 446 |
if og_img: poster = og_img.group(1)
|
| 447 |
result = {"src": video_src, "poster": poster, "type": vtype, "source": "mytv"}
|
| 448 |
if vtype == "hls":
|
|
|
|
| 442 |
vtype = "hls" if ".m3u8" in video_src else "video"
|
| 443 |
poster = ""
|
| 444 |
# Try to extract og:image
|
| 445 |
+
og_img = re.search(r'og:image["\'"].*?content=["\']([^"\']+)', r.text)
|
| 446 |
if og_img: poster = og_img.group(1)
|
| 447 |
result = {"src": video_src, "poster": poster, "type": vtype, "source": "mytv"}
|
| 448 |
if vtype == "hls":
|