g1879's recent timeline updates
g1879

g1879

V2EX member #491745, joined on 2020-05-27 07:53:06 +08:00
g1879's recent replies
Mar 28, 2024
Replied to a topic by BlueWaters Python DrissionPage 与 Selenium 和 Playwright 的对比
我是 DrissionPage 作者,欢迎大家提意见和 bug 。我会尽快改。
dp 其它的不说,有个好处是有问题可以直接找作者。
Feb 25, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@Motorola3 带账号代理目前需要用插件,无痕模式有这个设置。
Feb 24, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@LeeReamond 不是,无论是否设置都不阻塞。但是无论是否设置也都不能在 alert 出现后接管浏览器。
如果 alert 在程序接管前出现,才会阻塞。
Feb 23, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@LeeReamond 如果接管前 alert 就存在,是没有办法接管的。
Feb 20, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@LeeReamond 你用的是哪个版本?新版出现 alert 是没有阻塞的,alert 存在也会向后执行,但如果这个时候调用设计 js 的操作,才会抛出 AlertExistsError 。你的代码给我看看?
Feb 19, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@LeeReamond 不太明白,你意思是增加一个设置,接收到 alert 就抛出异常?
Feb 18, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@LeeReamond 不是全局等待,这个一两句说不太清楚,你先了解了解。我的等待方式比 selenium 好。比如说,selenium 的等待只能以最长的等待设置为准,我的可以用短的覆盖长的等待时间,有很多情况都灵活得多。
至于 alert ,我不理解你的意思。一般做自动化都先把网站行为摸透,知道什么时候会出现 alert 吧,不一定出现的,设个短的 timeout 就行了。
Feb 18, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@LeeReamond 用 handle_alert(),是可以处理的,不一定自动确认,accept 参数设为 None ,只获取 alert 文本不进行处理,然后再调用一次 handle_alert()处理就行。handle_alert()会自动等待 alert 出现再处理。
另外,还有 next_one 参数,用来处理下一次出现的 alert ,主要是处理页面跳转时触发的 alert 。
Feb 9, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@RangerWolf 我没有这个需求没有试过,群里好像有人这样用。
Feb 8, 2024
Replied to a topic by g1879 Python 安利一个自己的开源项目: DrissionPage
@x2ve 试试 page.listen.steps()
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5341 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 466ea39e · 23ms · UTC 07:04 · PVG 15:04 · LAX 00:04 · JFK 03:04
♥ Do have faith in what you're doing.