首页 > 解决方案 > 使用 AppleScript 在 eBay 上单击按钮时出现错误消息

问题描述

我正在尝试使用 AppleScript 在 eBay 中自动插入文章。因此,我必须找到一个代码,它会自动单击 eBay 页面中的按钮。我使用这段代码:

to clickID(theId)
    tell application "Safari"
        
        do JavaScript "document.getElementById('" & theId & "').click();" in document 1
    end tell
    
end clickID

clickID("w0-find-product-search-bar-search-field")

此代码不起作用。在源代码中,我收到此错误消息: [错误] [仅报告] 拒绝连接到https://backstory.ebay.de/customer/v1/customer_service?ct=1635315001915因为它既不出现在 connect-src指令也不是内容安全策略的 default-src 指令。

有什么我可以做的,我的代码可以工作,还是 ebay 只是禁止在他们的网站上使用这些代码?

标签: applescript

解决方案


推荐阅读