lee
lee

Reputation: 129

How to parse more information from a RSS site using feedparser?

I am using feedparser to fetch some information from some RSS site(like this site-- 'http://www.huxiu.com/rss/1.xml').

import feedparser

url = 'http://www.huxiu.com/rss/1.xml'
d = feedparser.parse(url)

entries = d.entries
print len(entries)

This print 8.It means I only fetch 8 news from this site.
The question is how to get more news from this site? Can I set the number that to fetch the news,like got 20 news from this site?
Thanks~~~~~

Upvotes: 1

Views: 714

Answers (3)

IM_AG
IM_AG

Reputation: 518

We are currently building a service/API to scrape data from any web site. Subscribe for beta testing: http://textract.me/

Upvotes: -1

Julien Genestoux
Julien Genestoux

Reputation: 33062

You usually can't get more than what's in a feed at a given time. However, if you subscribe to the feed and keep it in your system long enough, you'll be able to get more and more over time.

Upvotes: 2

Tasos
Tasos

Reputation: 7587

No you can't. The number of the fetched news is defined from the Website-provider. You have to parse the RSS daily and check for new content each time. You don't have access to older content from what provider gives access.

Upvotes: 0

Related Questions