parameters: (feed, max_entries=5)
return_statement: return content
docstring: ## Embeds a feed aggregator
          - ``name`` is the aggregator name
          - ``feed`` is a list comma separated feed urls (http://rss.cbc.ca/lineup/topstories.xml)
          - ``max_entries`` is the max number of displayed entries (default=5)
docstring_summary: ## Embeds a feed aggregator
          - ``name`` is the aggregator name
          - ``feed`` is a list comma separated feed urls (http://rss.cbc.ca/lineup/topstories.xml)
          - ``max_entries`` is the max number of displayed entries (default=5)
docstring_tokens: ## Embeds a feed aggregator - name is the aggregator name - feed is a list comma separated feed urls ( http : // rss . cbc . ca / lineup / topstories . xml ) - max_entries is the max number of displayed entries ( default = 5 )
function: def aggregator(feed, max_entries=5):
          """
          ## Embeds a feed aggregator
          - ``name`` is the aggregator name
          - ``feed`` is a list comma separated feed urls (http://rss.cbc.ca/lineup/topstories.xml)
          - ``max_entries`` is the max number of displayed entries (default=5)
          """
          import gluon.contrib.feedparser as feedparser
          lfeeds = isinstance(feeds,(str,unicode)) and feeds or feeds.split(",")
          content = DIV(A(d.channel.title,_href=d.channel.link,_rel=d.channel.description),
                        UL(),_id='web2py_aggregator')
          for feed in lfeeds:
              d = feedparser.parse(feed)
              for entry in d.entries[:max_entried]:
                  content[1] += LI(A(entry.title,' ',SPAN(entry.updated),
                                     _href=entry.link,_rel=entry.descstiption,
                                     _class=web2py_aggregator_link))
          return content
function_tokens: def aggregator ( feed , max_entries = 5 ) : import gluon . contrib . feedparser as feedparser lfeeds = isinstance ( feeds , ( str , unicode ) ) and feeds or feeds . split ( "," ) content = DIV ( A ( d . channel . title , _href = d . channel . link , _rel = d . channel . description ) , UL ( ) , _id = 'web2py_aggregator' ) for feed in lfeeds : d = feedparser . parse ( feed ) for entry in d . entries [ : max_entried ] : content [ 1 ] += LI ( A ( entry . title , ' ' , SPAN ( entry . updated ) , _href = entry . link , _rel = entry . descstiption , _class = web2py_aggregator_link ) ) return content