e
This commit is contained in:
parent
f1643110b2
commit
00000d99a3
2 changed files with 9 additions and 15 deletions
|
|
@ -3,7 +3,7 @@ import asyncio
|
|||
from pathlib import Path
|
||||
|
||||
import httpx
|
||||
from scrapers import fstv, livetvsx, ppv, streambtw, streameast, tvpass
|
||||
from scrapers import fstv, ppv, streambtw, streameast, tvpass
|
||||
from scrapers.utils import UA, get_logger
|
||||
|
||||
log = get_logger(__name__)
|
||||
|
|
@ -37,7 +37,6 @@ async def vanilla_fetch() -> tuple[list[str], int]:
|
|||
async def main() -> None:
|
||||
tasks = [
|
||||
asyncio.create_task(fstv.main(CLIENT)),
|
||||
asyncio.create_task(livetvsx.main(CLIENT)),
|
||||
asyncio.create_task(ppv.main(CLIENT)),
|
||||
asyncio.create_task(streambtw.main(CLIENT)),
|
||||
asyncio.create_task(streameast.main(CLIENT)),
|
||||
|
|
@ -49,14 +48,7 @@ async def main() -> None:
|
|||
|
||||
base_m3u8, tvg_chno = results[-1]
|
||||
|
||||
additions = (
|
||||
fstv.urls
|
||||
| livetvsx.urls
|
||||
| ppv.urls
|
||||
| streambtw.urls
|
||||
| streameast.urls
|
||||
| tvpass.urls
|
||||
)
|
||||
additions = fstv.urls | ppv.urls | streambtw.urls | streameast.urls | tvpass.urls
|
||||
|
||||
live_events = []
|
||||
|
||||
|
|
@ -66,16 +58,17 @@ async def main() -> None:
|
|||
):
|
||||
live_events.extend(
|
||||
(
|
||||
f'#EXTINF:-1 tvg-chno="{chnl_num}" tvg-id="(N/A)" tvg-name="{event}" tvg-logo="{info["logo"]}" group-title="Live Events",{event}',
|
||||
f'\n#EXTINF:-1 tvg-chno="{chnl_num}" tvg-id="(N/A)" tvg-name="{event}" tvg-logo="{info["logo"]}" group-title="Live Events",{event}',
|
||||
f'#EXTVLCOPT:http-referrer={info["base"]}',
|
||||
f'#EXTVLCOPT:http-origin={info["base"]}',
|
||||
f"#EXTVLCOPT:http-user-agent={UA}",
|
||||
info["url"],
|
||||
)
|
||||
)
|
||||
|
||||
m3u8_content = "\n".join(
|
||||
[
|
||||
'#EXTM3U url-tvg="https://raw.githubusercontent.com/doms9/iptv/refs/heads/default/EPG/TV.xml"'
|
||||
'#EXTM3U url-tvg="https://raw.githubusercontent.com/doms9/iptv/refs/heads/default/EPG/TV.xml\n"'
|
||||
]
|
||||
+ base_m3u8
|
||||
+ live_events
|
||||
|
|
|
|||
|
|
@ -103,9 +103,10 @@ async def process_event(
|
|||
og_title.attributes.get("content", "").split(" start on")[0].strip()
|
||||
)
|
||||
|
||||
if src := soup.css_first("iframe").attributes.get("src", ""):
|
||||
log.info(f"URL {url_num}) Captured M3U8")
|
||||
return match_name, unquote(src).split("link=")[-1]
|
||||
if ifr := soup.css_first("iframe"):
|
||||
if src := ifr.attributes.get("src", ""):
|
||||
log.info(f"URL {url_num}) Captured M3U8")
|
||||
return match_name, unquote(src).split("link=")[-1]
|
||||
|
||||
log.info(f"URL {url_num}) No M3U8 found")
|
||||
return "", ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue