Skip to content

Commit

Permalink
feat(AlistPath)提供Alist代理下载地址
Browse files Browse the repository at this point in the history
  • Loading branch information
Akimio521 committed Sep 24, 2024
1 parent 051a1df commit b0c9c9a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/api/alist/v3/path.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
# encoding: utf-8

from re import sub

from app.utils import URLUtils


Expand Down Expand Up @@ -87,6 +89,13 @@ def download_url(self):

return URLUtils.encode(url)

@property
def proxy_download_url(self):
"""
Alist代理下载地址
"""
return sub(r"/d/", "/p/", self.download_url, 1)

@property
def suffix(self):
"""
Expand Down

0 comments on commit b0c9c9a

Please sign in to comment.