Skip to content

Commit 1c49360

Browse files
Update veo
1 parent d188d29 commit 1c49360

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

pyproject.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ maintainers = [{name="Commandcracker"}]
77
license = {file = "LICENSE.txt"}
88
readme = "README.md"
99
dependencies = [
10-
"textual>=0.67.0",
10+
"textual==0.67.0", # 0.87.1
1111
"beautifulsoup4>=4.12.3",
12-
"httpx[http2]>=0.27.0",
12+
"httpx[http2]>=0.28.0",
1313
"pypresence>=4.3.0",
14-
"packaging>=24.1",
15-
"platformdirs>=4.2.2",
14+
"packaging>=24.2",
15+
"platformdirs>=4.3.6",
1616
"toml>=0.10.2",
1717
"fuzzywuzzy>=0.18.0",
1818
"async_lru>=2.0.4"
19-
#"yt-dlp>=2024.4.9",
20-
#"mpv>=1.0.6",
19+
#"yt-dlp>=2024.11.18",
20+
#"mpv>=1.0.7",
2121
]
2222
keywords = [
2323
"gucken",
@@ -49,10 +49,10 @@ classifiers = [
4949

5050
[project.optional-dependencies]
5151
speedups = [
52-
"levenshtein>=0.25.1",
53-
"orjson>=3.10.4"
52+
"levenshtein>=0.26.1",
53+
"orjson>=3.10.12"
5454
]
55-
socks = ["httpx[socks]>=0.27.0"]
55+
socks = ["httpx[socks]>=0.28.0"]
5656

5757
[project.urls]
5858
Repository = "https://github.com/Commandcracker/gucken"

src/gucken/hoster/veo.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@
44
from ..networking import AsyncClient
55
from .common import DirectLink, Hoster
66

7+
8+
REDIRECT_PATTERN = re_compile("https?://[^\s'\"<>]+")
79
EXTRACT_VEO_HLS_PATTERN = re_compile(r"'hls': '(?P<hls>.*)'")
810

911

1012
class VOEHoster(Hoster):
1113
async def get_direct_link(self) -> DirectLink:
1214
async with AsyncClient(verify=False) as client:
1315
response = await client.get(self.url)
14-
match = EXTRACT_VEO_HLS_PATTERN.search(response.text)
15-
link = match.group("hls")
16-
return DirectLink(b64decode(link).decode())
16+
match = REDIRECT_PATTERN.search(response.text)
17+
link = match.group()
18+
19+
response2 = await client.get(link)
20+
match2 = EXTRACT_VEO_HLS_PATTERN.search(response2.text)
21+
link2 = match2.group("hls")
22+
23+
return DirectLink(b64decode(link2).decode())

0 commit comments

Comments
 (0)