python - 前端er 想爬数据 从什么入门好?
PHP中文网
PHP中文网 2017-04-18 09:56:30
0
9
388

本人前端一枚

想做一个demo练手,需要得到爬取数据的本领,请问从哪里开始学习呢?

场景:爬取商品价格的数据,得到双十一前后的价格趋势变化,我可以如何入手呢?

我是JavaScript使用者,尽量使用node,如果Python学习成本比较高,求推荐教程和爬取数据的方法

PHP中文网
PHP中文网

认证0级讲师

reply all(9)
Peter_Zhu

Recommend https://github.com/alsotang/n...

洪涛

Crawler tool chain:

Use superagent to initiate an http request. After getting the response, use cheerio to parse the text. Then you can use syntax similar to jQuery to operate the Dom.

Mongodb can be used for data storage, and mongoose can be used as the corresponding ORM tool.

Code sample
https://github.com/zhanyouwei...

洪涛

Isn’t the cost of learning Python known to be the lowest? ? It’s easy to get started with Python crawlers. There are many online tutorials

Ty80

scrapy is definitely ranked first! ! !

小葫芦

To get started with Node decisively, you can refer to my novice experience https://github.com/hanzichi/f...

洪涛

The learning cost of Python is not very high, let me talk about my experience
At first I used urllib, or urllib2, and I was very excited to find that I could crawl the data
Then I saw a webpage where Connection is Closed, and I learned about httplib2
Then I saw requests again
Now I’m watching scrapy

Crawling is a metaphysics. I think the goal of the question is to check the price trend. However, I think we can set a small goal first and crawl Baidu Encyclopedia~

迷茫

Node crawler only costs 20

小葫芦

nodejs superagent + cheerio

伊谢尔伦

nodejs request + cheerio is also good.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template