p115client 0.0.5.11.8__py3-none-any.whl → 0.0.5.11.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
p115client/client.py CHANGED
@@ -220,12 +220,11 @@ def complete_lixian_api(
220
220
  return complete_api(path, base, base_url=base_url)
221
221
 
222
222
 
223
- def try_parse_int(s: int | str, /):
224
- if not isinstance(s, str):
225
- return s
226
- if s == "0":
227
- return 0
228
- if s.startswith("0") or s.strip(digits):
223
+ def try_parse_int(
224
+ s, /,
225
+ _match=re_compile("-?[1-9][0-9]*").fullmatch,
226
+ ):
227
+ if not isinstance(s, str) or not s or not _match(s):
229
228
  return s
230
229
  return int(s)
231
230
 
@@ -1671,7 +1670,7 @@ class ClientRequestMixin:
1671
1670
 
1672
1671
  GET https://qrcodeapi.115.com/api/1.0/web/1.0/qrcode
1673
1672
 
1674
- :params uid: 二维码的 uid
1673
+ :param uid: 二维码的 uid
1675
1674
 
1676
1675
  :return: 图片的二进制数据(PNG 图片)
1677
1676
  """
@@ -3579,7 +3578,7 @@ class P115OpenClient(ClientRequestMixin):
3579
3578
  payload = {"file_id": payload}
3580
3579
  elif isinstance(payload, str):
3581
3580
  if payload.startswith("0") or payload.strip(digits):
3582
- if not payload.startswith(("/", "<")):
3581
+ if not payload.startswith(("/", ">")):
3583
3582
  payload = "/" + payload
3584
3583
  payload = {"path": payload}
3585
3584
  else:
@@ -6072,7 +6071,8 @@ class P115Client(P115OpenClient):
6072
6071
  check_response(resp)
6073
6072
  tip_txt = resp["data"]["tip_txt"]
6074
6073
  return {
6075
- "name": tip_txt[:tip_txt.rfind("已经过")],
6074
+ "app_id": app_id,
6075
+ "name": tip_txt[:-10].removeprefix("\ufeff"),
6076
6076
  "icon": resp["data"]["icon"],
6077
6077
  }
6078
6078
  return run_gen_step(gen_step, may_call=False, async_=async_)
@@ -15467,7 +15467,7 @@ class P115Client(P115OpenClient):
15467
15467
  这个接口只支持 web 的 cookies,其它设备会返回空数据,而且获取得到的 m3u8 里的链接,也是 m3u8,会绑定前一次请求时的 user-agent
15468
15468
 
15469
15469
  :param pickcode: 视频文件的 pickcode
15470
- :params definition: 画质,默认列出所有画质。但可进行筛选,常用的为:
15470
+ :param definition: 画质,默认列出所有画质。但可进行筛选,常用的为:
15471
15471
  - 0: 各种分辨率(默认)
15472
15472
  - 1: SD 标清(约为 480p)
15473
15473
  - 3: HD 超清(约为 720p)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p115client
3
- Version: 0.0.5.11.8
3
+ Version: 0.0.5.11.8.2
4
4
  Summary: Python 115 webdisk client.
5
5
  Home-page: https://github.com/ChenyangGao/p115client
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
2
2
  p115client/__init__.py,sha256=1mx7njuAlqcuEWONTjSiiGnXyyNyqOcJyNX1FMHqQ-4,214
3
3
  p115client/_upload.py,sha256=RTYpM_EDFuI3O7yf08f13NdeG0iD03o_V4H6Je6Nsr8,30754
4
- p115client/client.py,sha256=YxVXjcnVZM5iCPFfpJGEdCP57mpKFUxXAhfsg6ZMobY,779699
4
+ p115client/client.py,sha256=esH4PcjWzNTBZ6nANzoh_R1vvrEWFlXE4Noccze7cLY,779710
5
5
  p115client/const.py,sha256=KqDGr9KsOnSkNVM3RIdQGptCMHbidMmZ_ffyFPiniww,7654
6
6
  p115client/exception.py,sha256=4SZ8ubOLMRxtcqc0u1kNzXqH1a6wwXJFwGnRDURoEgQ,3708
7
7
  p115client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,7 +20,7 @@ p115client/tool/upload.py,sha256=i6laoeG7GdNO7hvCDVBy8Yv2Is800wL7O5na6a3v70g,159
20
20
  p115client/tool/util.py,sha256=0o9TrXdoPcljgxDDRdxRon41bq1OjuUYCWsR0XLfmPo,3357
21
21
  p115client/tool/xys.py,sha256=vU28Px2yeQzIxxGkopJIpvV6TdOnWJ5xB6NPXpTgM0Y,10306
22
22
  p115client/type.py,sha256=7kOp98uLaYqcTTCgCrb3DRcl8ukMpn7ibsnVvtw2nG8,6250
23
- p115client-0.0.5.11.8.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
24
- p115client-0.0.5.11.8.dist-info/METADATA,sha256=Ng7fJ9yIRTxGaXzAqM8rHjbRmgVlt-hdDoJ8C9dlJYM,8192
25
- p115client-0.0.5.11.8.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
26
- p115client-0.0.5.11.8.dist-info/RECORD,,
23
+ p115client-0.0.5.11.8.2.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
24
+ p115client-0.0.5.11.8.2.dist-info/METADATA,sha256=qz1jYoDBjpbqe-S0AePKTJgmGMgvK5FMNnF-2MKzq8w,8194
25
+ p115client-0.0.5.11.8.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
26
+ p115client-0.0.5.11.8.2.dist-info/RECORD,,