flowerains
V2EX  ›  Python

初次进入python的世界,有点无从下手的感觉,请python大神能为我指条明路

By flowerains at 2013 年 10 月 12 日 · 5436 次点击
我用python就两个目的:
1.写点爬虫程序,帮我抓点网页保存点数据到数据库
2.做web开发,能做一个类似自己用的博客的就行

但是初入大门,虽然有方向但不知道从哪里开始学起和做实验
本人有2年左右php开发经验,对nginx,php,mysql,jquery,linux都有一定的了解了
入门书籍http://woodpecker.org.cn/abyteofpython_cn/chinese/ch01s02.html
也看完了,求接下来应该怎么做
11 条回复  •  1970-01-01 08:00:00 +08:00
erictang66
   1
erictang66  
   2013 年 10 月 12 日
你现在可以做的就是比如看一下python的标准库,先从基本的爬虫开始写,慢慢来,再有如果是想写web的话,可以先去了解一下tornado,django以及webpy这些常用的web框架等等,理论上来说,你以前学过其他的编程语言的话,学一门新的语言并不是很难,我也是自学的python,都是零零碎碎的时间学的
flynngao
   2
flynngao  
   2013 年 10 月 12 日
写网站?
vmebeh
   3
vmebeh  
   2013 年 10 月 12 日
和楼主一样先爬虫后博客

爬虫就和浏览器流程差不多,先下载网页,再提取需要的内容,URL都会有规律的,有分页的都可以提取到下一页/上一页的URL。

博客就复杂点,如1楼所说,最好了解一下已有的web框架,然后根据你博客准备部署的平台选一种框架,再看看那个框架的文档,你有基础很快就能写好。
moroumo
   4
moroumo  
   2013 年 10 月 12 日
在写爬虫ing,也是初学。
用http://doc.scrapy.org/en/latest/index.html
RIcter
   5
RIcter  
   2013 年 10 月 14 日
Blog的话我的就是Python下的WEB.py开发的。
http://ricter.info
等我重构后把源代码扔到github上好了..
xdyl
   6
xdyl  
   2013 年 10 月 14 日
Scrapy.抓取网页入库SoEasy.
不过解析我用的是Java版的自动解析正文.
Python的没试过.
xdyl
   7
xdyl  
   2013 年 10 月 14 日
Scrapy做爬虫解析代码的话也就是十行左右.入库也就是五行左右.赶紧写几个试试去
ivanlw
   8
ivanlw  
   2013 年 10 月 14 日 via iPhone
mulog
   9
mulog  
   2013 年 10 月 16 日
@RIcter
赞一下你的照片墙
flowerains
   10
flowerains  
OP
   2013 年 10 月 16 日
@xdyl
感谢你的帮助,有没有相应的教程?
请原谅我的伸手..
flowerains
   11
flowerains  
OP
   2013 年 10 月 16 日
@RIcter
很期待你的作品
推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
© 2026 V2EX · 42ms · 3.9.8.5