Skip to content

Commit

Permalink
confirm and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
xiong233 committed Apr 25, 2022
1 parent 7302880 commit 7059d6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

`pip install -r requirements.txt`

`playwright install-deps webkit
`playwright install-deps firefox
`

运行打卡项目
Expand All @@ -60,4 +60,6 @@

a,各种坑还搜不到解决方案; b,必须使用有头模式,无头模式也会判定爬虫; c,action每次打卡都要传输chrome压缩包。

所以用[Playwright](https://github.com/microsoft/playwright-python) 实现了一下,能在Ubuntu上跑无头模式,语法跟Pyppeter差不多
所以用[Playwright](https://github.com/microsoft/playwright-python) 实现本项目,能跑无头模式,语法跟Pyppeter差不多

好像也有一些坑,有时候打不开网站
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def main():

page.wait_for_timeout(1000)
page.locator(confirm_button).wait_for(timeout=10000)
# page.click(confirm_button)
page.click(confirm_button)
print("Confirm OK ", time() - logtime)
page.wait_for_timeout(1000)
browser.close()
Expand Down

0 comments on commit 7059d6c

Please sign in to comment.