Coder Social home page Coder Social logo

thesaurusspider's Introduction

搜狗、百度、QQ输入法词库爬虫


用python实现的爬取搜狗、百度、QQ输入法词库的爬虫。各文件夹对应的内容如下

每个输入法均采用了单线程和多线程实现了爬取功能。多线程的速度要远快于单线程,线程数目建议设为5~10,或者保留默认的设定数5。

通过urllib2、Queue、re、threading等python自带模块实现,无依赖的第三方模块。使用时将singleThreadDownload.py(单线程下载)或 multiThreadDownload.py(多线程下载)中的主函数中的baseDir改为自己的下载路径即可运行单线程下载或多线程下载,注意baseDir末尾没有/。

如果有下载不成功的文件或解析不成功的页面,在下载根目录会生成下载日志,记录这些文件和页面的URL信息,方便debug。

关于实现的具体细节可参考这篇文章

thesaurusspider's People

Contributors

wulc avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.