优艾设计网

Mac下crontab 无法执行selenium 财富值88?

优艾设计网 https://www.uibq.com 2023-04-25 09:16 出处:网络 作者:在线设计
#-*- coding: UTF-8 -*-#!/usr/bin/env python print(\"test - 1\") import sys from selenium import webdriver print(\"test - 2\") url = \"http://XXX.com/\" driver = webdriver.Firefox()driver.get(url+ \"/\

#-*- coding: UTF-8 -*-#!/usr/bin/env python print("test - 1") import sys from selenium import webdriver print("test - 2") url = "http://XXX.com/" driver = webdriver.Firefox()driver.get(url+ "/") driver.find_element_by_xpath("//div[2]/input").send_keys("XXX") driver.find_element_by_xpath("//div[3]/input").send_keys("XXX") driver.find_element_by_id("loginButton").click() driver.find_element_by_css_selector("a > img").click()driver.quit()

代码如上图
crontab 配置:

export DISPLAY=:0.0 &&python /Users/l/Downloads/phantomjs-2.1.1-macosx/bin/release-day/test.py>> /Users/l/Downloads/log

输出结果优艾设计网_平面设计为:

test - 1

请教是什么问题?解决方案是什么?


0

精彩评论

暂无评论...
验证码 换一张
取 消