python_scripts icon indicating copy to clipboard operation
python_scripts copied to clipboard

一些python相关的演示代码

Results 39 python_scripts issues
Sort by recently updated
recently updated
newest added

周半部分的好多图片下载失败,是不是wkhtmltopdf分配的缓存太小了。因为失败的图片总是后半部分的图。而错误信息也没有提示什么有用的: Traceback (most recent call last): File "crawler.py", line 165, in crawler.run() File "crawler.py", line 99, in run pdfkit.from_file(htmls, self.name + ".pdf", options=options) File "D:\Program Files\Python36\lib\site-packages\pdfkit\api.py", line 49, in from_file...

![2017-03-14 23 23 24](https://cloud.githubusercontent.com/assets/22999454/23907921/75819538-090d-11e7-8c59-d05c23f56b13.png) 在html的时候是正常的,应该是转pdf的时候变了,是options设置不对吗? ![2017-03-14 23 28 36](https://cloud.githubusercontent.com/assets/22999454/23908090/008415e8-090e-11e7-8e87-487cc511e6c1.png) 在Mac下做的。

运行 `heart.py`,`response.json()[0]` 报错: ``` raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded ``` 新浪微博API返回的是html,并不是json格式,因此报错

Traceback (most recent call last): File "crawler.py", line 56, in parse_url_to_html f.write(html) TypeError: a bytes-like object is required, not 'str' During handling of the above exception, another exception occurred: Traceback...

运行后能生成pdf文件,但是cmd里面会显示错误。 ![image](https://cloud.githubusercontent.com/assets/17404865/23019533/ce5bd08c-f47d-11e6-8893-2be8f623c8f4.png) 还有,那些HTML文件也没有删除

在windows10下pip需要安装beautifulsoup4 不加4 默认安装的是3. 在win ubuntu全提示字符错误 windows `ERROR:root:瑙f瀽閿欒 Traceback (most recent call last): File "crawler.py", line 56, in parse_url_to_html html = html.encode("utf-8") UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position...

The only way I could do this was to make sure I didn’t have any issues.