Skip to content

Commit

Permalink
修复奶牛快传非Pro账号上传后传输链接错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandaft committed Jul 18, 2022
1 parent fac5bce commit d446e8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions uploader/cowtransfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def get_subdomain(self):
req_url = "https://cowtransfer.com/api/generic/v3/initial"
resp = requests.get(url=req_url, headers=self.auth_headers)
sub_domain = resp.json()["account"]["subDomain"]
if not sub_domain:
self.upload_info["url_prefix"] = f"https://cowtransfer.com/s/"
return True
self.upload_info["url_prefix"] = f"https://{sub_domain}.cowtransfer.com/s/"
return True
except Exception as exc:
Expand Down

0 comments on commit d446e8f

Please sign in to comment.