All Projects → chenjiandongx → Stackoverflow Spider

chenjiandongx / Stackoverflow Spider

Licence: mit
📖 爬取 Stackoverflow 100万 条问答并简单分析

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Stackoverflow Spider

Decryptlogin
APIs for loginning some websites by using requests.
Stars: ✭ 1,861 (+969.54%)
Mutual labels:  stackoverflow, spider
Proxy pool
Python爬虫代理IP池(proxy pool)
Stars: ✭ 13,964 (+7925.29%)
Mutual labels:  spider
Scriptspider
一个java版本的分布式的通用爬虫,可以插拔各个组件(提供默认的)
Stars: ✭ 155 (-10.92%)
Mutual labels:  spider
Mooc Dl
👨‍🎓 中国大学MOOC全课件(视频、文档、附件)下载器
Stars: ✭ 163 (-6.32%)
Mutual labels:  spider
Abot
Cross Platform C# web crawler framework built for speed and flexibility. Please star this project! +1.
Stars: ✭ 1,961 (+1027.01%)
Mutual labels:  spider
Reading List Mover
A Python utility for moving bookmarks/reading lists between services
Stars: ✭ 166 (-4.6%)
Mutual labels:  stackoverflow
Python3 Spider
Python爬虫实战 - 模拟登陆各大网站 包含但不限于:滑块验证、拼多多、美团、百度、bilibili、大众点评、淘宝,如果喜欢请start ❤️
Stars: ✭ 2,129 (+1123.56%)
Mutual labels:  spider
Spoon
🥄 A package for building specific Proxy Pool for different Sites.
Stars: ✭ 173 (-0.57%)
Mutual labels:  spider
Gain
Web crawling framework based on asyncio.
Stars: ✭ 2,002 (+1050.57%)
Mutual labels:  spider
Scrapingoutsourcing
ScrapingOutsourcing专注分享爬虫代码 尽量每周更新一个
Stars: ✭ 164 (-5.75%)
Mutual labels:  spider
Cutcode
A browser extension that enables double click to copy code snippet from stack overflow.
Stars: ✭ 163 (-6.32%)
Mutual labels:  stackoverflow
Fink
PHP Link Checker
Stars: ✭ 157 (-9.77%)
Mutual labels:  spider
Jandan spider
使用Python3爬取煎蛋妹纸图片
Stars: ✭ 168 (-3.45%)
Mutual labels:  spider
Stack Overflow Buddy
A friendly, error prone coding companion
Stars: ✭ 156 (-10.34%)
Mutual labels:  stackoverflow
Linkedin Profile Scraper
🕵️‍♂️ LinkedIn profile scraper returning structured profile data in JSON. Works in 2020.
Stars: ✭ 171 (-1.72%)
Mutual labels:  spider
Fp Server
Free proxy server, continuously crawling and providing proxies, based on Tornado and Scrapy. 免费代理服务器,基于Tornado和Scrapy,在本地搭建属于自己的代理池
Stars: ✭ 154 (-11.49%)
Mutual labels:  spider
Js Reverse
JS逆向研究
Stars: ✭ 159 (-8.62%)
Mutual labels:  spider
Stackanswers.vim
Vim plugin to fetch and display answers from Stack Overflow
Stars: ✭ 165 (-5.17%)
Mutual labels:  stackoverflow
Owllook
owllook-小说搜索引擎
Stars: ✭ 2,163 (+1143.1%)
Mutual labels:  spider
Pythondemo
My Python Demo
Stars: ✭ 173 (-0.57%)
Mutual labels:  spider

爬取 Stackoverflow 1m 条问答

作为一个热爱编程的大学生,怎么能不知道面向 stackoverflow 编程呢。

打开 stackoverflow 主页,在 questions 页面下选择按 vote 排序,爬取前 20000 页,每页将问题数量设置为 50,共 1m 条,(实际上本来是想爬完 13m 条的,但 1m 条后面问题基本上都只有 1 个或 0 个回答,那就选取前 1m 就好吧)

实际上用数据库去重后只有 999654 条问答信息

对爬取数据进行简单分析

votes 分析

降序排列了 votes 数,生成折线图

Votes折线图
2k 后的问题的 votes 数基本上就已经在 400 以下了,接着后面的就基本上是贴地飞行了
votes 数最多 : Why is it faster to process a sorted array than an unsorted array?

votes 数的连续分布情况

votes甘特图
可见最多的还是集中在 1-2K 之间,从 6k 开始基本上就断层了

具体数据

description count
votes >= 500 1630
votes >= 400 2325
votes >= 300 3782
votes >= 200 7062
votes >= 100 19781

如果以 100 为分界线的话,会得到这样的一个饼图

pie_votes_1
大于 100 的连 %2 都不到

再来看看底层的数据

description count
1 <= votes <= 5 211804
6 <= votes <= 10 430935
11 <= votes <= 15 136647
16 <= votes <= 20 64541
votes <= 20 843927

可见 votes 小于 20 的,数量高达 84m
看看总体的比例吧
pie_votes_2

answers 分析

降序排列了 answers 数,生成折线图

answers折线图
很明显 3k 之后的 answers 数基本上就小于 20 了
answers 数最多: What is the best comment in source code you have ever encountered? [closed]

answers 数的连续分布情况

answers甘特图
150 后也就断层了,实际上能达到这样的回答数极少

具体数据

description count
answers >= 5 218059
answers >= 10 34500
answers >= 20 3808
answers >= 30 968

大于 30 的确实少的可怜,看看总体情况
pie_answer_1

views 分析

降序排列了 views 数,生成折线图

views折线图
最高达到了 4.5m,100000 以后的基本上就不足 28000 了
views 数最多: How to undo last commit(s) in Git?

views 数的连续分布情况

views甘特图

具体数据

description count
views >= 5000 486466
views >= 10000 315576
views >= 20000 171873
views >= 50000 59363
views >= 100000 22224
views >= 200000 7030

大部分问答的 views 数还是集中在 20000 以内
还是得看看总体分布
bubble_views

再看看 votes,views,answers 三者的散点图对应情况

votes - views

votes-views散点图

votes - answers

votes-answers散点图

views - answers

views-answers散点图

总的来说,这三者对应关系类似于一个金字塔。三个图基本上都是左下角靠近原点的区域被填满,也就是说绝对大部分的问题的 votes,answers 和 views 都是属于最下层的。高质量活跃的问题是处于金字塔顶端的。三者的最高数好像也没特别明显的对应关系,且三者的最高数都不是同一个问题。

根据所有问题的 tags 提取出总量前 200 的关键词(前 50 条如下),第 1 名是 c#,python 排在第 5

('c#', 94614),
('java', 93244),
('javascript', 76722),
('android', 69321),
('python', 62502),
('c++', 58173),
('php', 42596),
('ios', 37773),
('jquery', 37405),
('.net', 36180),
('html', 28536),
('css', 26174),
('c', 24699),
('objective-c', 23253),
('iphone', 22171),
('ruby-on-rails', 20143),
('sql', 19171),
('asp.net', 18060),
('mysql', 17559),
('ruby', 16397),
('r', 15670),
('git', 13139),
('linux', 13080),
('asp.net-mvc', 12857),
('angularjs', 12606),
('sql-server', 12473),
('node.js', 12212),
('django', 11576),
('arrays', 11006),
('algorithm', 10959),
('wpf', 10631),
('performance', 10619),
('xcode', 10613),
('string', 10426),
('windows', 10132),
('eclipse', 10117),
('scala', 9942),
('regex', 9685),
('multithreading', 9601),
('json', 9266),
('swift', 8950),
('c++11', 8939),
('haskell', 8823),
('osx', 8159),
('visual-studio', 8140),
('html5', 7627),
('database', 7567),
('xml', 7478),
('spring', 7464),
('unit-testing', 7253),
('bash', 6825)

这样看好像不太直观,所以就把它根据词频生成了词云

词云

因为是用 Python 写的爬虫,所以重点来分析下 Python 类的问答

votes 数前 10

answers 数前 10

views 数前 10

三者的前十中有两个问题是完全重叠的,分别是

欢迎 Fork 和 Star

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].