File tree Expand file tree Collapse file tree 2 files changed +19
-12
lines changed
Expand file tree Collapse file tree 2 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,17 @@ maintainers = [{name="Commandcracker"}]
77license = {file = " LICENSE.txt" }
88readme = " README.md"
99dependencies = [
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]
2222keywords = [
2323 " gucken" ,
@@ -49,10 +49,10 @@ classifiers = [
4949
5050[project .optional-dependencies ]
5151speedups = [
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 ]
5858Repository = " https://github.com/Commandcracker/gucken"
Original file line number Diff line number Diff line change 44from ..networking import AsyncClient
55from .common import DirectLink , Hoster
66
7+
8+ REDIRECT_PATTERN = re_compile ("https?://[^\s'\" <>]+" )
79EXTRACT_VEO_HLS_PATTERN = re_compile (r"'hls': '(?P<hls>.*)'" )
810
911
1012class 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 ())
You can’t perform that action at this time.
0 commit comments