File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
1
import requests
2
+
2
3
from one import OneNote
3
4
from profile import Profile
4
- from xhs_utils .xhs_util import get_headers , get_params , js
5
-
5
+ from xhs_utils .xhs_util import get_headers , get_params , js , check_cookies
6
+
7
+
6
8
class Home :
7
- def __init__ (self ):
9
+ def __init__ (self , cookies = None ):
10
+ if cookies is None :
11
+ self .cookies = check_cookies ()
12
+ else :
13
+ self .cookies = cookies
8
14
self .more_url = 'https://edith.xiaohongshu.com/api/sns/web/v1/user_posted'
9
- self .profile = Profile ()
10
- self .oneNote = OneNote (self .profile . cookies )
15
+ self .profile = Profile (self . cookies )
16
+ self .oneNote = OneNote (self .cookies )
11
17
self .headers = get_headers ()
12
18
self .params = get_params ()
13
- self . cookies = self . profile . cookies
19
+
14
20
15
21
# 主页
16
22
def get_all_note_info (self , url ):
@@ -87,4 +93,3 @@ def main(self, url_list):
87
93
]
88
94
home .main (url_list )
89
95
90
-
You can’t perform that action at this time.
0 commit comments