快乐十分20选8技巧 www.6qljx.cn 使用python解析rss非feedparse莫属了。feedparse是第三方的python库,需要先安装一下

# wget https://pypi.python.org/packages/source/f/feedparser/feedparser-5.1.3.tar.gz#md5=f2253de78085a1d5738f626fcc1d8f71 --no-check-certificate
--2014-09-18 09:22:44--  https://pypi.python.org/packages/source/f/feedparser/feedparser-5.1.3.tar.gz
Resolving pypi.python.org... 103.245.222.223
Connecting to pypi.python.org|103.245.222.223|:443... connected.
WARNING: certificate common name `www.python.org' doesn't match requested host name `pypi.python.org'.
HTTP request sent, awaiting response... 200 OK
Length: 283614 (277K) [application/octet-stream]
Saving to: `feedparser-5.1.3.tar.gz'

100%[=============================================================================================>] 283,614   

  1.09M/s   in 0.2s    

2014-09-18 09:22:46 (1.09 MB/s) - `feedparser-5.1.3.tar.gz' saved [283614/283614]

# tar zxf feedparser-5.1.3.tar.gz 
# cd feedparser-5.1.3
# ll
total 52
drwxrwxr-x 3 1000 1000  4096 Dec 10  2012 docs
drwxrwxr-x 4 1000 1000  4096 Dec 10  2012 feedparser
-rw-rw-r-- 1 1000 1000  3194 Sep 23  2012 LICENSE
-rw-rw-r-- 1 1000 1000   187 Sep 23  2012 MANIFEST.in
-rw-rw-r-- 1 1000 1000 20395 Dec 10  2012 NEWS
-rw-rw-r-- 1 1000 1000  1272 Dec 10  2012 PKG-INFO
-rw-rw-r-- 1 1000 1000  2503 Sep 23  2012 README
-rw-rw-r-- 1 1000 1000    59 Dec 10  2012 setup.cfg
-rw-rw-r-- 1 1000 1000  1530 Dec 10  2012 setup.py

看到上面那个setup.py了吧,执行下面命令安装吧

# python setup.py install
Traceback (most recent call last):
  File "setup.py", line 1, in 
    from setuptools import setup
ImportError: No module named setuptools

如果你遇到这个错误,说明你没有安装setuptools,那么请为《Python安装setuptools》,之后再回来继续安装吧。

# python setup.py install
running install
running bdist_egg
running egg_info
writing feedparser/feedparser.egg-info/PKG-INFO
writing top-level names to feedparser/feedparser.egg-info/top_level.txt
writing dependency_links to feedparser/feedparser.egg-info/dependency_links.txt
reading manifest file 'feedparser/feedparser.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'feedparser/feedparser.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build
creating build/lib
copying feedparser/feedparser.py -> build/lib
creating build/bdist.linux-i686
creating build/bdist.linux-i686/egg
copying build/lib/feedparser.py -> build/bdist.linux-i686/egg
byte-compiling build/bdist.linux-i686/egg/feedparser.py to feedparser.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
copying feedparser/feedparser.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying feedparser/feedparser.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying feedparser/feedparser.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying feedparser/feedparser.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/feedparser-5.1.3-py2.7.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing feedparser-5.1.3-py2.7.egg
Copying feedparser-5.1.3-py2.7.egg to /usr/local/lib/python2.7/site-packages
Adding feedparser 5.1.3 to easy-install.pth file

Installed /usr/local/lib/python2.7/site-packages/feedparser-5.1.3-py2.7.egg
Processing dependencies for feedparser==5.1.3
Finished processing dependencies for feedparser==5.1.3

这样,feedparser??榫桶沧巴瓿闪?。

转载请注明:快乐十分20选8技巧 » python安装feedparser

2访客评论

  1. 怎么把友情链接都撤掉了呢

    灯火部落09-20 11:16 回复
    • 新版的wordpress后台貌似没这个配置,就没管这个了

      ustckris09-22 12:05 回复

我来说说

(便于我们更好的交流)

有不明白的地方欢迎留言哦~
取消
  • 你反来复去说1+1=2,真痴呆了?你应该讲点其他的吧,譬如,1+1=2,是客观事实还是规律,是真理还是谬误。 2019-05-17
  • 当然,可这免费卡可以转给他人用,而这人并非是享有免费的人[微笑] 2019-05-17
  • 银联商务“银杏大数据”获“金融大数据创新应用优秀成果奖” 2019-05-03
  • 面包屑-热门标签-华商生活 2019-04-23
  • 黄子韬的下颚线简直完美!有棱有角的!能get到黄子韬的帅吗?[色][色][色][色] 2019-04-16
  • 落实学生视力分级管理应抓好考核的“牛鼻子” 2019-04-15
  • 高清:中国男篮抵达洛杉矶 长途飞行队员略显疲惫 2019-04-14
  • 【北京奥吉通国门车型报价】北京奥吉通国门4S店车型价格 2019-04-01
  • 深改组1000天——亚心网专题 2019-03-23
  • 阳泉首次颁布地方实体性法规 两部法规将于7月1日起实施 2019-03-23
  • 人民日报客户端宣传页 2019-03-15
  • 阿不都20+5王哲林14分 红队20分大胜复仇澳联队 2019-03-15
  • 辽宁:电商成为精准扶贫的“利器” 2018-09-14
  • 鄱阳湖花海:文明仍应成为最美风景 2018-09-14
  • 时间放宽了,考核更难了 2018-07-26
  • 73| 845| 465| 729| 27| 667| 50| 695| 533| 337|