摘要: 方法一、 1、打开 vi /etc/sysconfig/network-scripts/ifcfg-enp4s0(每个机子都可能不一样,但格式会是“ifcfg-e...”)。但内容包含: <strong>TYPE=Ethernet #网卡类型 DEVICE=eth0 #网卡接口名称 ONBOOT=n 阅读全文
posted @ 2018-06-06 18:41 秋华 阅读(207) 评论(0) 推荐(0)
摘要: 原链接:https://blog.csdn.net/vito21/article/details/53490435 今天爬一个网站的内容,在写入TXT文件时,某些页面总是报UnicodeEncodeError: ‘gbk’ codec can’t encode character错误,网上找了半天也 阅读全文
posted @ 2018-06-05 10:52 秋华 阅读(5317) 评论(0) 推荐(0)
摘要: 解决办法: 代码中设置参数: path_wk = r‘D:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe‘ #wkhtmltopdf安装位置 config = pdfkit.configuration(wkhtmltopdf = path_wk) 最后执 阅读全文
posted @ 2018-06-02 09:32 秋华 阅读(3599) 评论(0) 推荐(0)
摘要: 原文:https://blog.csdn.net/tymatlab/article/details/78647543 PyQt5 渲染动态网页 示例代码: # -*- coding: UTF-8 -*-import sysfrom PyQt5.QtCore import QUrlfrom PyQt5 阅读全文
posted @ 2018-05-28 16:44 秋华 阅读(2819) 评论(0) 推荐(0)
摘要: 解决方法: 设置了Accept头后解决了,但是还是不知道原因 阅读全文
posted @ 2018-05-27 19:03 秋华 阅读(1295) 评论(0) 推荐(0)
摘要: C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.4\sbin>rabbitmqctl list_queues Error: unable to perform an operation on node 'rabbit@xxxxxxx'. Pl 阅读全文
posted @ 2018-05-09 21:33 秋华 阅读(11571) 评论(0) 推荐(0)
摘要: Python3.x爬虫, 发现报错“UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1:invalid start byte”, 方法一: 一直在找文件的错误,最后经过网友的提示,错误原因竟然是我的报头中有一条 阅读全文
posted @ 2018-04-22 14:51 秋华 阅读(2801) 评论(0) 推荐(0)
摘要: 原文链接:https://www.cnblogs.com/gayhub/p/pythongetcookiefromchrome.html 好几年前我在做一些自动化的脚本时,脑子里也闪过这样的想法:能不能直接把浏览器的cookies取出来用呢? 直到昨天看到代码《python模拟发送动弹》,想起来当年 阅读全文
posted @ 2018-04-21 20:43 秋华 阅读(3164) 评论(0) 推荐(0)
摘要: 在练习urllib操作中,遇到了url中含有中文字符的问题。比如http://dotamax.com/,看下源码的话,上方的搜索框的name=p,输入内容点击搜索以后,通过GET方法进行传递,比如我们搜索”意“,url变为http://dotamax.com/search/?q=意。但是url中是不 阅读全文
posted @ 2018-04-13 16:21 秋华 阅读(1425) 评论(0) 推荐(0)
摘要: 关键字参数必须跟随在位置参数后面! 因为python函数在解析参数时, 是按照顺序来的, 位置参数是必须先满足, 才能考虑其他可变参数. 阅读全文
posted @ 2018-04-11 16:18 秋华 阅读(12031) 评论(0) 推荐(0)