Windows上安裝Scrapy

來源:互聯網
上載者:User

Scrapy文檔 Scrapy

Scrapy,Python開發的一個快速、高層次的螢幕抓取和web抓取架構,用於抓取web網站並從頁面中提取結構化的資料。Scrapy用途廣泛,可以用於資料採礦、監測和自動化測試。
Scrapy迷人的地方在於它是一個架構,任何人都可以根據需求方便的修改。它也提供了多種類型爬蟲的基類,如BaseSpider、sitemap爬蟲等,最新版本又提供了web2.0爬蟲的支援。 安裝依賴

Scrapy安裝依賴於以下幾個Python庫
* lxml, an efficient XML and HTML parser
* parsel, an HTML/XML data extraction library written on top of lxml,
* w3lib, a multi-purpose helper for dealing with URLs and web page encodings
* twisted, an asynchronous networking framework
* cryptography and pyOpenSSL, to deal with various network-level security needs

我選擇手動安裝這些依賴

pip install lxmlpip install parselpip install w3libpip install twistedpip install cryptographypip install pyOpenSSL

其他的安裝都很順利,就是在安裝twisted的時候報錯了。

Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

於是下載離線的安裝(下載自己的版本)
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted

下載到一個目錄,然後用

pip install Twisted-17.9.0-cp36-cp36m-win32.whl

之後再用下面的命令安裝就可以了

pip install Scrapy
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.