mirror of
https://github.com/doms9/iptv.git
synced 2026-03-07 11:18:25 +01:00
e
- add adblocking - edit roxie.py scraping method - edit tvapp.py scraping method - modify sports to scrape - misc edits
This commit is contained in:
parent
12d6d959f4
commit
00000d90e4
26 changed files with 59290 additions and 264 deletions
|
|
@ -19,13 +19,12 @@ BASE_URL = "https://backend.streamcenter.live/api/Parties"
|
|||
CATEGORIES = {
|
||||
4: "Basketball",
|
||||
9: "Football",
|
||||
# 13: "Baseball",
|
||||
13: "Baseball",
|
||||
# 14: "American Football",
|
||||
15: "Motor Sport",
|
||||
16: "Hockey",
|
||||
17: "Fight MMA",
|
||||
18: "Boxing",
|
||||
19: "NCAA Sports",
|
||||
20: "WWE",
|
||||
21: "Tennis",
|
||||
}
|
||||
|
|
@ -103,15 +102,15 @@ async def scrape(browser: Browser) -> None:
|
|||
|
||||
events = await get_events(cached_urls.keys())
|
||||
|
||||
log.info(f"Processing {len(events)} new URL(s)")
|
||||
|
||||
if events:
|
||||
log.info(f"Processing {len(events)} new URL(s)")
|
||||
|
||||
async with network.event_context(browser, stealth=False) as context:
|
||||
for i, ev in enumerate(events, start=1):
|
||||
async with network.event_page(context) as page:
|
||||
handler = partial(
|
||||
network.process_event,
|
||||
url=ev["link"],
|
||||
url=(link := ev["link"]),
|
||||
url_num=i,
|
||||
page=page,
|
||||
log=log,
|
||||
|
|
@ -125,11 +124,10 @@ async def scrape(browser: Browser) -> None:
|
|||
)
|
||||
|
||||
if url:
|
||||
sport, event, ts, link = (
|
||||
sport, event, ts = (
|
||||
ev["sport"],
|
||||
ev["event"],
|
||||
ev["timestamp"],
|
||||
ev["link"],
|
||||
)
|
||||
|
||||
key = f"[{sport}] {event} ({TAG})"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue