這個列表包含與網頁抓取和數據處理的Python庫。
網絡
[if !supportLists]· [endif]通用
[if !supportLists]§ [endif]urllib -網絡庫(stdlib)。
[if !supportLists]§ [endif]requests -網絡庫。
[if !supportLists]§ [endif]grab – 網絡庫(基於pycurl)。
[if !supportLists]§ [endif]pycurl – 網絡庫(綁定libcurl)。
[if !supportLists]§ [endif]urllib3 – Python HTTP庫,安全連接池、支持文件post、可用性高。
[if !supportLists]§ [endif]httplib2 – 網絡庫。
[if !supportLists]§ [endif]RoboBrowser – 一個簡單的、極具Python風格的Python庫,無需獨立的瀏覽器即可瀏覽網頁。
[if !supportLists]§ [endif]MechanicalSoup -一個與網站自動交互Python庫。
[if !supportLists]§ [endif]mechanize -有狀態、可編程的Web瀏覽庫。
[if !supportLists]§ [endif]socket – 底層網絡接口(stdlib)。
[if !supportLists]§ [endif]Unirest for Python – Unirest是一套可用於多種語言的輕量級的HTTP庫。
[if !supportLists]§ [endif]hyper – Python的HTTP/2客戶端。
[if !supportLists]§ [endif]PySocks – SocksiPy更新並積極維護的版本,包括錯誤修復和一些其他的特徵。作爲socket模塊的直接替換。
[if !supportLists]· [endif]異步
[if !supportLists]§ [endif]treq – 類似於requests的API(基於twisted)。
[if !supportLists]§ [endif]aiohttp – asyncio的HTTP客戶端/服務器(PEP-3156)。
網絡爬蟲框架
[if !supportLists]· [endif]功能齊全的爬蟲
[if !supportLists]§ [endif]grab – 網絡爬蟲框架(基於pycurl/multicur)。
[if !supportLists]§ [endif]scrapy – 網絡爬蟲框架(基於twisted),不支持Python3。
[if !supportLists]§ [endif]pyspider – 一個強大的爬蟲系統。
[if !supportLists]§ [endif]cola – 一個分佈式爬蟲框架。
[if !supportLists]· [endif]其他
[if !supportLists]§ [endif]portia – 基於Scrapy的可視化爬蟲。
[if !supportLists]§ [endif]restkit – Python的HTTP資源工具包。它可以讓你輕鬆地訪問HTTP資源,並圍繞它建立的對象。
[if !supportLists]§ [endif]demiurge – 基於PyQuery的爬蟲微框架。
HTML/XML解析器
[if !supportLists]· [endif]通用
[if !supportLists]§ [endif]lxml – C語言編寫高效HTML/
XML處理庫。支持XPath。
[if !supportLists]§ [endif]cssselect – 解析DOM樹和CSS選擇器。
[if !supportLists]§ [endif]pyquery – 解析DOM樹和jQuery選擇器。
[if !supportLists]§ [endif]BeautifulSoup – 低效HTML/ XML處理庫,純Python實現。
[if !supportLists]§ [endif]html5lib – 根據WHATWG規範生成HTML/ XML文檔的DOM。該規範被用在現在所有的瀏覽器上。
[if !supportLists]§ [endif]feedparser – 解析RSS/ATOM feeds。
[if !supportLists]§ [endif]MarkupSafe – 爲XML/HTML/XHTML提供了安全轉義的字符串。
[if !supportLists]§ [endif]xmltodict – 一個可以讓你在處理XML時感覺像在處理JSON一樣的Python模塊。
[if !supportLists]§ [endif]xhtml2pdf – 將HTML/CSS轉換爲PDF。
[if !supportLists]§ [endif]untangle – 輕鬆實現將XML文件轉換爲Python對象。
[if !supportLists]· [endif]清理
[if !supportLists]§ [endif]Bleach – 清理HTML(需要html5lib)。
[if !supportLists]§ [endif]sanitize – 爲混亂的數據世界帶來清明。
文本處理
用於解析和操作簡單文本的庫。
[if !supportLists]· [endif]通用
[if !supportLists]· [endif]difflib – (Python標準庫)幫助進行差異化比較。
[if !supportLists]· [endif]Levenshtein – 快速計算Levenshtein距離和字符串相似度。
[if !supportLists]· [endif]fuzzywuzzy – 模糊字符串匹配。
[if !supportLists]· [endif]esmre – 正則表達式加速器。
[if !supportLists]· [endif]ftfy – 自動整理Unicode文本,減少碎片化。
[if !supportLists]· [endif]轉換
[if !supportLists]· [endif]unidecode – 將Unicode文本轉爲ASCII。
[if !supportLists]· [endif]字符編碼
[if !supportLists]· [endif]uniout – 打印可讀字符,而不是被轉義的字符串。
[if !supportLists]· [endif]chardet – 兼容 Python的2/3的字符編碼器。
[if !supportLists]· [endif]xpinyin – 一個將中國漢字轉爲拼音的庫。
[if !supportLists]· [endif]pangu.py – 格式化文本中CJK和字母數字的間距。
[if !supportLists]· [endif]Slug化
[if !supportLists]· [endif]awesome-slugify – 一個可以保留unicode的Python slugify庫。
[if !supportLists]· [endif]python-slugify – 一個可以將Unicode轉爲ASCII的Python
slugify庫。
[if !supportLists]· [endif]unicode-slugify – 一個可以將生成Unicode slugs的工具。
[if !supportLists]· [endif]pytils – 處理俄語字符串的簡單工具(包括pytils.translit.slugify)。
[if !supportLists]· [endif]通用解析器
[if !supportLists]· [endif]PLY –lex和yacc解析工具的Python實現。
[if !supportLists]· [endif]pyparsing – 一個通用框架的生成語法分析器。
[if !supportLists]· [endif]人的名字
[if !supportLists]· [endif]python-nameparser -解析人的名字的組件。
[if !supportLists]· [endif]電話號碼
[if !supportLists]· [endif]phonenumbers -解析,格式化,存儲和驗證國際電話號碼。
[if !supportLists]· [endif]用戶代理字符串
[if !supportLists]· [endif]python-user-agents – 瀏覽器用戶代理的解析器。
[if !supportLists]· [endif]HTTP Agent Parser – Python的HTTP代理分析器。
特定格式文件處理
解析和處理特定文本格式的庫。
[if !supportLists]· [endif]通用
[if !supportLists]· [endif]tablib – 一個把數據導出爲XLS、CSV、JSON、YAML等格式的模塊。
[if !supportLists]· [endif]textract – 從各種文件中提取文本,比如 Word、PowerPoint、PDF等。
[if !supportLists]· [endif]messytables – 解析混亂的表格數據的工具。
[if !supportLists]· [endif]rows – 一個常用數據接口,支持的格式很多(目前支持CSV,HTML,XLS,TXT – 將來還會提供更多!)。
[if !supportLists]· [endif]Office
[if !supportLists]· [endif]python-docx – 讀取,查詢和修改的Microsoft Word2007/2008的docx文件。
[if !supportLists]· [endif]xlwt / xlrd – 從Excel文件讀取寫入數據和格式信息。
[if !supportLists]· [endif]XlsxWriter – 一個創建Excel.xlsx文件的Python模塊。
[if !supportLists]· [endif]xlwings – 一個BSD許可的庫,可以很容易地在Excel中調用Python,反之亦然。
[if !supportLists]· [endif]openpyxl – 一個用於讀取和寫入的Excel2010 XLSX/ XLSM/ xltx/ XLTM文件的庫。
[if !supportLists]· [endif]Marmir – 提取Python數據結構並將其轉換爲電子表格。
[if !supportLists]· [endif]PDF
[if !supportLists]· [endif]PDFMiner – 一個從PDF文檔中提取信息的工具。
[if !supportLists]· [endif]PyPDF2 – 一個能夠分割、合併和轉換PDF頁面的庫。
[if !supportLists]· [endif]ReportLab – 允許快速創建豐富的PDF文檔。
[if !supportLists]· [endif]pdftables – 直接從PDF文件中提取表格。
[if !supportLists]· [endif]Markdown
[if !supportLists]· [endif]Python-Markdown – 一個用Python實現的John Gruber的Markdown。
[if !supportLists]· [endif]Mistune – 速度最快,功能全面的Markdown純Python解析器。
[if !supportLists]· [endif]markdown2 – 一個完全用Python實現的快速的Markdown。
[if !supportLists]· [endif]YAML
[if !supportLists]· [endif]PyYAML – 一個Python的YAML解析器。
[if !supportLists]· [endif]CSS
[if !supportLists]· [endif]cssutils – 一個Python的CSS庫。
[if !supportLists]· [endif]ATOM/RSS
[if !supportLists]· [endif]feedparser – 通用的feed解析器。
[if !supportLists]· [endif]SQL
[if !supportLists]· [endif]sqlparse – 一個非驗證的SQL語句分析器。
[if !supportLists]· [endif]HTTP
[if !supportLists]· [endif]HTTP
[if !supportLists]· [endif]http-parser – C語言實現的HTTP請求/響應消息解析器。
[if !supportLists]· [endif]微格式
[if !supportLists]· [endif]opengraph – 一個用來解析Open Graph協議標籤的Python模塊。
[if !supportLists]· [endif]可移植的執行體
[if !supportLists]· [endif]pefile – 一個多平臺的用於解析和處理可移植執行體(即PE)文件的模塊。
[if !supportLists]· [endif]PSD
[if !supportLists]· [endif]psd-tools – 將Adobe Photoshop PSD(即PE)文件讀取到Python數據結構。
自然語言處理
處理人類語言問題的庫。
[if !supportLists]· [endif]NLTK -編寫Python程序來處理人類語言數據的最好平臺。
[if !supportLists]· [endif]Pattern – Python的網絡挖掘模塊。他有自然語言處理工具,機器學習以及其它。
[if !supportLists]· [endif]TextBlob – 爲深入自然語言處理任務提供了一致的API。是基於NLTK以及Pattern的巨人之肩上發展的。
[if !supportLists]· [endif]jieba – 中文分詞工具。
[if !supportLists]· [endif]SnowNLP – 中文文本處理庫。
[if !supportLists]· [endif]loso – 另一箇中文分詞庫。
[if !supportLists]· [endif]genius – 基於條件隨機域的中文分詞。
[if !supportLists]· [endif]langid.py – 獨立的語言識別系統。
[if !supportLists]· [endif]Korean – 一個韓文形態庫。
[if !supportLists]· [endif]pymorphy2 – 俄語形態分析器(詞性標註+詞形變化引擎)。
[if !supportLists]· [endif]PyPLN – 用Python編寫的分佈式自然語言處理通道。這個項目的目標是創建一種簡單的方法使用NLTK通過網絡接口處理大語言庫。
瀏覽器自動化與仿真
[if !supportLists]· [endif]selenium – 自動化真正的瀏覽器(Chrome瀏覽器,火狐瀏覽器,Opera瀏覽器,IE瀏覽器)。
[if !supportLists]· [endif]Ghost.py – 對PyQt的webkit的封裝(需要PyQT)。
[if !supportLists]· [endif]Spynner – 對PyQt的webkit的封裝(需要PyQT)。
[if !supportLists]· [endif]Splinter – 通用API瀏覽器模擬器(selenium web驅動,Django客戶端,Zope)。
多重處理
[if !supportLists]· [endif]threading – Python標準庫的線程運行。對於I/O密集型任務很有效。對於CPU綁定的任務沒用,因爲python GIL。
[if !supportLists]· [endif]multiprocessing – 標準的Python庫運行多進程。
[if !supportLists]· [endif]celery – 基於分佈式消息傳遞的異步任務隊列/作業隊列。
[if !supportLists]· [endif]concurrent-futures – concurrent-futures 模塊爲調用異步執行提供了一個高層次的接口。
異步
異步網絡編程庫
[if !supportLists]· [endif]asyncio – (在Python 3.4 +版本以上的 Python標準庫)異步I/O,時間循環,協同程序和任務。
[if !supportLists]· [endif]Twisted – 基於事件驅動的網絡引擎框架。
[if !supportLists]· [endif]Tornado – 一個網絡框架和異步網絡庫。
[if !supportLists]· [endif]pulsar –Python事件驅動的併發框架。
[if !supportLists]· [endif]diesel – Python的基於綠色事件的I/O框架。
[if !supportLists]· [endif]gevent – 一個使用greenlet 的基於協程的Python網絡庫。
[if !supportLists]· [endif]eventlet – 有WSGI支持的異步框架。
[if !supportLists]· [endif]Tomorrow – 異步代碼的奇妙的修飾語法。
隊列
[if !supportLists]· [endif]celery – 基於分佈式消息傳遞的異步任務隊列/作業隊列。
[if !supportLists]· [endif]huey – 小型多線程任務隊列。
[if !supportLists]· [endif]mrq –Mr. Queue – 使用redis & Gevent 的Python分佈式工作任務隊列。
[if !supportLists]· [endif]RQ – 基於Redis的輕量級任務隊列管理器。
[if !supportLists]· [endif]simpleq – 一個簡單的,可無限擴展,基於Amazon SQS的隊列。
[if !supportLists]· [endif]python-gearman – Gearman的Python API。
雲計算
[if !supportLists]· [endif]picloud – 雲端執行Python代碼。
[if !supportLists]· [endif]dominoup.com – 雲端執行R,Python和matlab代碼。
電子郵件
電子郵件解析庫
[if !supportLists]· [endif]flanker – 電子郵件地址和Mime解析庫。
[if !supportLists]· [endif]Talon –Mailgun庫用於提取消息的報價和簽名。
網址和網絡地址操作
解析/修改網址和網絡地址庫。
[if !supportLists]· [endif]URL
[if !supportLists]§ [endif]furl – 一個小的Python庫,使得操縱URL簡單化。
[if !supportLists]§ [endif]purl – 一個簡單的不可改變的URL以及一個乾淨的用於調試和操作的API。
[if !supportLists]§ [endif]urllib.parse – 用於打破統一資源定位器(URL)的字符串在組件(尋址方案,網絡位置,路徑等)之間的隔斷,爲了結合組件到一個URL字符串,並將「相對URL」轉化爲一個絕對URL,稱之爲「基本URL」。
[if !supportLists]§ [endif]tldextract – 從URL的註冊域和子域中準確分離TLD,使用公共後綴列表。
[if !supportLists]· [endif]網絡地址
[if !supportLists]§ [endif]netaddr – 用於顯示和操縱網絡地址的Python庫。
網頁內容提取
提取網頁內容的庫。
[if !supportLists]· [endif]HTML頁面的文本和元數據
[if !supportLists]§ [endif]newspaper – 用Python進行新聞提取、文章提取和內容策展。
[if !supportLists]§ [endif]html2text – 將HTML轉爲Markdown格式文本。
[if !supportLists]§ [endif]python-goose – HTML內容/文章提取器。
[if !supportLists]§ [endif]lassie – 人性化的網頁內容檢索工具
[if !supportLists]§ [endif]micawber – 一個從網址中提取豐富內容的小庫。
[if !supportLists]§ [endif]sumy -一個自動彙總文本文件和HTML網頁的模塊
[if !supportLists]§ [endif]Haul – 一個可擴展的圖像爬蟲。
[if !supportLists]§ [endif]python-readability – arc90 readability工具的快速Python接口。
[if !supportLists]§ [endif]scrapely – 從HTML網頁中提取結構化數據的庫。給出了一些Web頁面和數據提取的示例,scrapely爲所有類似的網頁構建一個分析器。
[if !supportLists]· [endif]視頻
[if !supportLists]§ [endif]youtube-dl – 一個從YouTube下載視頻的小命令行程序。
[if !supportLists]§ [endif]you-get – Python3的YouTube、優酷/ Niconico視頻下載器。
[if !supportLists]· [endif]維基
[if !supportLists]§ [endif]WikiTeam – 下載和保存wikis的工具。
WebSocket
用於WebSocket的庫。
[if !supportLists]· [endif]Crossbar – 開源的應用消息傳遞路由器(Python實現的用於Autobahn的WebSocket和WAMP)。
[if !supportLists]· [endif]AutobahnPython – 提供了WebSocket協議和WAMP協議的Python實現並且開源。
[if !supportLists]· [endif]WebSocket-for-Python – Python 2和3以及PyPy的WebSocket客戶端和服務器庫。
DNS解析
[if !supportLists]· [endif]dnsyo – 在全球超過1500個的DNS服務器上檢查你的DNS。
[if !supportLists]· [endif]pycares – c-ares的接口。c-ares是進行DNS請求和異步名稱決議的C語言庫。
計算機視覺
[if !supportLists]· [endif]OpenCV – 開源計算機視覺庫。
[if !supportLists]· [endif]SimpleCV – 用於照相機、圖像處理、特徵提取、格式轉換的簡介,可讀性強的接口(基於OpenCV)。
[if !supportLists]· [endif]mahotas – 快速計算機圖像處理算法(完全使用 C++ 實現),完全基於 numpy 的數組作爲它的數據類型。
代理服務器
[if !supportLists]· [endif]shadowsocks – 一個快速隧道代理,可幫你穿透防火牆(支持TCP和UDP,TFO,多用戶和平滑重啓,目的IP黑名單)。
[if !supportLists]· [endif]tproxy – tproxy是一個簡單的TCP路由代理(第7層),基於Gevent,用Python進行配置。
其他Python工具列表
[if !supportLists]· [endif]awesome-python
[if !supportLists]· [endif]pycrumbs
[if !supportLists]· [endif]python-github-projects
[if !supportLists]· [endif]python_reference
[if !supportLists]· [endif]pythonidae
喜歡的朋友可以加QQ羣813622576,羣內有免費資料個大家一起交流學習哦!!