原创 Linux下安裝ChromeDriver和PhantomJS

1.首先下載瀏覽器驅動chromedirver下載地址:  https://npm.taobao.org/mirrors/chromedriverphantomjs下載地址:  http://phantomjs.org/download.

原创 scrapy使用Pipeline保存數據至本地遇到的問題

在scrapy的settings.py文件中設置了ITEM_PIPELINES = { # 數值小的 Pipeline 類優先執行 'mypjt.pipelines.MypjtPipeline': 300, }但執行爬蟲的

原创 centos下安裝python3並與python2共存

轉自https://www.cnblogs.com/simuhunluo/p/7704765.html 如果使用make命令出現 configure: error: no acceptable C compiler found in

原创 pymysql插入中文數據亂碼問題

1.'latin-1' codec can't encode characters錯誤首先要確保pymysql的配置文件編碼爲utf8,否則就會報出以下錯誤UnicodeEncodeError: 'latin-1' codec can't

原创 Scrapy命令詳解

Scrapy的全局命令: 1.fetch    用來顯示爬蟲爬取的過程 通過 scrapy fetch 網址 的形式顯示出爬取對應網址的過程 --spider=SPIDER         use this spider       

原创 Python3操作mysql數據庫

安裝與準備首先,安裝pymysql模塊,sudo pip install pymysql數據庫連接對象connectionFunction描述connection創建connection對象cursor()使用該鏈接創建+返回遊標comm

原创 記一次Linux下安裝pyspider的過程

首先執行pip install pyspider此時系統提示Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Lau0Qp/pycu

原创 linux下安裝Scrapy所遇到的compilation terminated問題

執行sudo pip3 install scrapy來安裝Scrapy時,終端報出如下問題: #include "Python.h" ^ compilation terminated

原创 Linux下使用Fiddler

1.安裝MonoMono是一個可以跨平臺跑.NET的程序應用,安裝命令很簡單,輸入:sudo apt-get install mono-complete2.下載Fiddler for Mono打開http://fiddler.wikido

原创 Scrapy手動終止爬蟲

轉載自  https://blog.csdn.net/Q_AN1314/article/details/51104701 Scrapy的CloseSpider擴展會在滿足條件時自動終止爬蟲程序。可以設置CLOSESPIDER_TIMEOU

原创 mysql8.0.11安裝:

mysql8.0.11安裝:點擊打開鏈接

原创 pymysql.err.InternalError: (1054, "Unknown column 'firsttitle' in 'field list'")

import pymysql conn1 = pymysql.connect(host="127.0.0.1",user="root",password="1234",db="mypydb") x = 'firsttitle' y =

原创 啓動 pyspider 時 Could not create web server listening on port 25555 報錯

輸入netstat -atunlp 命令,來顯示路由表、實際的網絡連接以及每一個網絡接口設備的狀態信息找到phantomjs 進程,原來phantomjs 在後臺已經啓動tcp 0 0 0.0.0.0:25555 0.0.0.0:* LI

原创 XenC數據選擇工具的使用

XenC數據選擇工具 系統要求: gcc version 4.5.1 or higher CMake 2.8.4 or higher boost version 1.57.0 or higher gzip 編譯安裝 解壓X

原创 WMT的英德翻譯

1. The University of Cambridge’s Machine Translation Systems for WMT18 1. basic Architecture Combine the three most c