|
|
@ -11,6 +11,7 @@ from init_api import get_service |
|
|
|
|
|
|
|
|
|
|
|
import dotenv |
|
|
|
import dotenv |
|
|
|
import asyncio |
|
|
|
import asyncio |
|
|
|
|
|
|
|
import re |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Match: |
|
|
|
class Match: |
|
|
@ -42,7 +43,11 @@ class Match: |
|
|
|
return 5 |
|
|
|
return 5 |
|
|
|
|
|
|
|
|
|
|
|
def event_data(self): |
|
|
|
def event_data(self): |
|
|
|
vods = "\n".join([f'<a href="{link}">Game {i + 1}</a>' for i, link in enumerate(self.vods)]) |
|
|
|
def shorten(link: str): |
|
|
|
|
|
|
|
# remove all query parameters except t= |
|
|
|
|
|
|
|
return re.sub(r'([?&](?!t=))([^&=]+=[^&=]+)', r'\1', link) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vods = "\r\n".join([f'Game {i + 1}: {shorten(link)}' for i, link in enumerate(self.vods)]) |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
"start": { |
|
|
|
"start": { |
|
|
|