Toggle navigation
Toggle navigation
This project
Loading...
Sign in
LiuFuhua
/
xj-marketing
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
rinalLi
2024-12-24 17:15:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0df957797f82d0d78d507f3a047ec614f9844e53
0df95779
1 parent
f8bfd207
u
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
uploader/sohu_uploader/main.py
uploader/sohu_uploader/main.py
View file @
0df9577
...
...
@@ -49,7 +49,7 @@ async def get_sohu_cookie(account_file):
'args'
:
[
'--lang en-GB'
],
'headless'
:
Tru
e
,
# Set headless option here
'headless'
:
Fals
e
,
# Set headless option here
}
# Make sure to run headed.
browser
=
await
playwright
.
chromium
.
launch
(
**
options
)
...
...
@@ -63,9 +63,14 @@ async def get_sohu_cookie(account_file):
except
:
pass
await
asyncio
.
sleep
(
1
)
await
page
.
wait_for_selector
(
"div.user-ico"
,
timeout
=
50000
)
await
page
.
locator
(
"div.hd-login-logo span"
)
.
nth
(
1
)
.
click
()
try
:
await
page
.
wait_for_selector
(
"a.hd-fBtn-userlogin img"
,
timeout
=
100000
)
except
:
sohu_logger
.
info
(
"登录超时"
)
return
sohu_logger
.
info
(
"搜狐视频登录成功"
)
await
asyncio
.
sleep
(
3
)
await
asyncio
.
sleep
(
1
)
# await page.pause()
# 点击调试器的继续,保存cookie
...
...
Please
register
or
login
to post a comment