p123client 0.0.7.1__tar.gz → 0.0.7.1.1__tar.gz
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.
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/PKG-INFO +1 -1
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/p123client/client.py +11 -0
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/pyproject.toml +1 -1
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/LICENSE +0 -0
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/p123client/__init__.py +0 -0
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/p123client/const.py +0 -0
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/p123client/exception.py +0 -0
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/p123client/py.typed +0 -0
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/p123client/tool/__init__.py +0 -0
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/p123client/type.py +0 -0
- {p123client-0.0.7.1 → p123client-0.0.7.1.1}/readme.md +0 -0
@@ -8583,6 +8583,7 @@ class P123Client(P123OpenClient):
|
|
8583
8583
|
self,
|
8584
8584
|
payload: dict | Iterable[dict],
|
8585
8585
|
/,
|
8586
|
+
upload_dir: None | int | str = None,
|
8586
8587
|
base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
|
8587
8588
|
*,
|
8588
8589
|
async_: Literal[False] = False,
|
@@ -8594,6 +8595,7 @@ class P123Client(P123OpenClient):
|
|
8594
8595
|
self,
|
8595
8596
|
payload: dict | Iterable[dict],
|
8596
8597
|
/,
|
8598
|
+
upload_dir: None | int | str = None,
|
8597
8599
|
base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
|
8598
8600
|
*,
|
8599
8601
|
async_: Literal[True],
|
@@ -8604,6 +8606,7 @@ class P123Client(P123OpenClient):
|
|
8604
8606
|
self,
|
8605
8607
|
payload: dict | Iterable[dict],
|
8606
8608
|
/,
|
8609
|
+
upload_dir: None | int | str = None,
|
8607
8610
|
base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
|
8608
8611
|
*,
|
8609
8612
|
async_: Literal[False, True] = False,
|
@@ -8644,6 +8647,9 @@ class P123Client(P123OpenClient):
|
|
8644
8647
|
"select_file_id": [info["id"] for info in resource["files"]],
|
8645
8648
|
} for resource in payload]
|
8646
8649
|
}
|
8650
|
+
payload = cast(dict, payload)
|
8651
|
+
if upload_dir is not None:
|
8652
|
+
payload["upload_dir"] = upload_dir
|
8647
8653
|
return self.request(
|
8648
8654
|
"v2/offline_download/task/submit",
|
8649
8655
|
"POST",
|
@@ -8706,6 +8712,7 @@ class P123Client(P123OpenClient):
|
|
8706
8712
|
self,
|
8707
8713
|
/,
|
8708
8714
|
url: str | Iterable[str],
|
8715
|
+
upload_dir: None | int | str = None,
|
8709
8716
|
base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
|
8710
8717
|
*,
|
8711
8718
|
async_: Literal[False] = False,
|
@@ -8717,6 +8724,7 @@ class P123Client(P123OpenClient):
|
|
8717
8724
|
self,
|
8718
8725
|
/,
|
8719
8726
|
url: str | Iterable[str],
|
8727
|
+
upload_dir: None | int | str = None,
|
8720
8728
|
base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
|
8721
8729
|
*,
|
8722
8730
|
async_: Literal[True],
|
@@ -8727,6 +8735,7 @@ class P123Client(P123OpenClient):
|
|
8727
8735
|
self,
|
8728
8736
|
/,
|
8729
8737
|
url: str | Iterable[str],
|
8738
|
+
upload_dir: None | int | str = None,
|
8730
8739
|
base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
|
8731
8740
|
*,
|
8732
8741
|
async_: Literal[False, True] = False,
|
@@ -8737,6 +8746,7 @@ class P123Client(P123OpenClient):
|
|
8737
8746
|
POST https://www.123pan.com/api/offline_download/upload/seed
|
8738
8747
|
|
8739
8748
|
:param url: info_hash(只允许单个)、下载链接(多个用 "\n" 分隔)或者多个下载链接的迭代器
|
8749
|
+
:param upload_dir: 保存到目录的 id
|
8740
8750
|
:param base_url: API 链接的基地址
|
8741
8751
|
:param async_: 是否异步
|
8742
8752
|
:param request_kwargs: 其它请求参数
|
@@ -8760,6 +8770,7 @@ class P123Client(P123OpenClient):
|
|
8760
8770
|
check_response(resp)
|
8761
8771
|
return self.offline_task_submit(
|
8762
8772
|
resp["data"]["list"],
|
8773
|
+
upload_dir,
|
8763
8774
|
base_url=base_url,
|
8764
8775
|
async_=async_,
|
8765
8776
|
**request_kwargs,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|