归档: 2019年9月

Tilo Mitra's avatar

socketserve文件发送

服务端import socketserverimport structimport jsonclass Myserver(socketserver.BaseRequestHandler): def handle(self): # server = socket.socket() # server.bind(('127.0.0.1',8000)) # server .listen(5) # conn,addr = server.accept() obj = self.request.recv(4) h...

Tilo Mitra's avatar

selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH.

出现报错信息selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH. 解决方案下载phantomjshttps://phantomjs.org/download.htmlbrowser = webdriver.PhantomJS(executable_path=r'C:\Users\lyh\Anaconda2\phantomjs-2.1.1-windows\bin\phan

Tilo Mitra's avatar

InsecureRequestWarning: Unverified HTTPS request is being made....报错

使用requests进行get请求的时候,控制台输出如下错误。InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.最简单,不顾一切的解决办法。。import urllib3 urllib3.disable_warnings()

Tilo Mitra's avatar

报错requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)

只需在post,get,put,等里面添加 verify=False例如print(requests.get(url,verify=False))

Tilo Mitra's avatar

SyntaxError: Non-UTF-8 code starting with '\xb2in file.

解决方案在文件开头加# coding=gbk或者其他#encoding=utf-8#encoding=gb2312#unicoding=gb2312

Tilo Mitra's avatar

linux命令行查看谷歌浏览器版本号

google-chrome --version

Tilo Mitra's avatar

解决selenium报错--unknown error: DevToolsActivePort file doesn't exist

添加代码from selenium.webdriver.chrome.options import Optionschrome_options = Options()chrome_options.add_argument('--no-sandbox')chrome_options.add_argument('--disable-dev-shm-usage')chrome_options.add_argument('--headless')browser = webdriver.Chrome(chrome_options=chrome_options)其中“–no-sandbox”参数是让...

Tilo Mitra's avatar

centos7安装谷歌浏览器

1. 配置yum源cd /etc/yum.repos.dvim google-chrome.repo2.写入配置[google-chrome]name=google-chromebaseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearchenabled=1gpgcheck=1gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub3.安装google chrome浏览器yum -y install google-chrome-stable --nogpgchec...

Tilo Mitra's avatar

robotframework中的RIDE的下载安装

python环境3.6.6安装RIDE需要的环境pip install robotframeworkpip install Pygmentspip install wxPython下载RIDE的地址https://github.com/HelioGuilherme66/RIDE/archive/python3.zip下载解压执行 python setup.py install命令行提示:Creating Desktop Shortcut to RIDE...表示成功创建快捷方式桌面鼠标右键->新建->快捷方式-输入C:\Users\Administrator.BF201908...

下一页  

湘ICP备19016894号 © 2019 小钱