갈루아의 반서재

728x90

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/'

 

728x90