isrpa 0.8.5__py3-none-any.whl → 0.8.7__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.
isrpa/utils.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import os
|
2
2
|
|
3
3
|
import requests
|
4
|
+
import tldextract
|
4
5
|
|
5
6
|
|
6
7
|
def getPath(user_name):
|
@@ -95,9 +96,20 @@ def save_file(url, cookies, file_path):
|
|
95
96
|
"""
|
96
97
|
playwright保存文件
|
97
98
|
"""
|
99
|
+
extracted = tldextract.extract(url)
|
100
|
+
top_level_domain = f"{extracted.domain}.{extracted.suffix}"
|
98
101
|
cookie = {}
|
99
102
|
for item in cookies:
|
100
|
-
|
103
|
+
if top_level_domain in item.get("domain"):
|
104
|
+
cookie[item["name"]] = item["value"]
|
105
|
+
print("------top_level_domain------")
|
106
|
+
print(top_level_domain)
|
107
|
+
print("------raw cookies------")
|
108
|
+
print(cookies)
|
109
|
+
print("------cookie-----")
|
110
|
+
print(cookie)
|
111
|
+
print("------url-----")
|
112
|
+
print(url)
|
101
113
|
response = requests.get(url, cookies=cookie)
|
102
114
|
with open(file_path, 'wb') as file:
|
103
115
|
file.write(response.content)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: isrpa
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.7
|
4
4
|
Summary: isrpa package
|
5
5
|
Home-page: https://github.com/yourusername/mypackage
|
6
6
|
Author: ysq
|
@@ -10,6 +10,8 @@ Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
11
|
Requires-Python: >=3.6
|
12
12
|
Description-Content-Type: text/markdown
|
13
|
+
Requires-Dist: requests
|
14
|
+
Requires-Dist: tldextract
|
13
15
|
|
14
16
|
python setup.py sdist bdist_wheel
|
15
17
|
|
@@ -3,8 +3,8 @@ isrpa/Template.py,sha256=UP1uovLvJzXEPGo_hzLrIYOu3vZP8Cf6m3G2hGzQ6XA,1958
|
|
3
3
|
isrpa/Template_Exception.py,sha256=an6eQ1NMB8a9R-J0yyMdwHIZcZeDtdV5f7fWKZQsZ3s,819
|
4
4
|
isrpa/__init__.py,sha256=pG-YPVG0gJIJ6s4xcAz9S_CnUxpUcz33wl9eNUSgxGk,20
|
5
5
|
isrpa/message.py,sha256=N0s6hMaC5S-Pi4EhwcSp-ngfBTBQyW6ymU9sI9dUSeE,11329
|
6
|
-
isrpa/utils.py,sha256=
|
7
|
-
isrpa-0.8.
|
8
|
-
isrpa-0.8.
|
9
|
-
isrpa-0.8.
|
10
|
-
isrpa-0.8.
|
6
|
+
isrpa/utils.py,sha256=LQ0A5YdKO86v8cEj98yuXvC_MOw4jTQDg7BWkdaWGXQ,51568
|
7
|
+
isrpa-0.8.7.dist-info/METADATA,sha256=krdk8EX_X33wm2XLiboRzqGc1a8lWiYKWlNXotgFKPE,511
|
8
|
+
isrpa-0.8.7.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
9
|
+
isrpa-0.8.7.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
|
10
|
+
isrpa-0.8.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|