最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Nodriver Maximize Window - Stack Overflow

programmeradmin4浏览0评论

I have been using selenium for quite some time with great success but some of the sites I visit are now using datadome. Try as i might, datadome is able to detect any of the methods advocating for avoiding it. I have now discovered ndriver used in concert with asyncio and have successfully gotten past the security checks. However, i am having trouble with nodriver in a number of areas that i hope someone could help me with or point me in the right direction.

i'd like to open the window in full size, but i can't figure out how to do that. The only solution i could come up with is to open it and then use pyautogui to expand. Here's my code (the maximize does not do anything:

# start a new Chrome instance
driver = await uc.start(maximize=True)
#   Force window to maximum size - crude method - fix someday
pyautogui.click(x=1181, y=38)
# visit the target website

Thanks - i have more questions, but will use a second posting.

发布评论

评论列表(0)

  1. 暂无评论