feedparser 설치
설치여부 확인
(envtread)root@localhost:~/antifragile# python
Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, Sep 15 2015, 14:50:01)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import feedparser
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named feedparser
>>> exit()
feedparser 설치
(envtread)root@localhost:~/antifragile# pip install feedparser
Collecting feedparser
Downloading feedparser-5.2.1.tar.bz2 (192kB)
100% |████████████████████████████████| 192kB 467kB/s
Building wheels for collected packages: feedparser
Running setup.py bdist_wheel for feedparser
Stored in directory: /root/.cache/pip/wheels/13/92/a8/21287963f9d6e303776b30bc59d6c4a850ffd0d4fa980000df
Successfully built feedparser
Installing collected packages: feedparser
Successfully installed feedparser-5.2.1
(envtread)root@localhost:~/antifragile# python
Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, Sep 15 2015, 14:50:01)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import feedparser
>>> d = feedparser.parse('http://www.reddit.com/r/python/.rss')
>>> d['feed']['title']
u'Python'
>>> d['feed']['link']
u'http://www.reddit.com/r/Python/'
'프로그래밍 Programming' 카테고리의 다른 글
셀레늄(Selenuim) 설치 및 테스팅 (윈도우/파이썬) (0) | 2015.11.28 |
---|---|
object has no attribute 'title' and getattr(object, name[, default]) (0) | 2015.11.20 |
render_to, render_to_response (0) | 2015.10.26 |
ImportError: No module named mechanize (0) | 2015.10.23 |
윈도우에 easy_install, pip 설치하기 (0) | 2015.10.17 |