All items in feeds marked as hidden
Frédéric Crozat
fred at crozat.net
Tue Jul 18 07:31:21 EST 2006
Le lundi 17 juillet 2006 à 21:09 +0200, Gregory Watts a écrit :
> On 7/5/06, David Pashley <david at davidpashley.com> wrote:
>
> > Recent versions of Feedparser have pluggable date detection support, so
> > you could add some code to support their date. It looks like it should
> > be fairly easy to parse.
> >
> > http://www.feedparser.org/docs/date-parsing.html
> >
>
> Hi,
>
> I've done the change:
>
> #
> # date format for liberation.fr
> #
> _libe_date_pattern = re.compile(r'(\d{4})/(\d{2})/(\d{2})\s+(\d{2}):(\d{2})')
>
> def libeDateHandler(aDateString):
> '''parse a date in YYYY/MM/DD HH:MM format'''
> year, month, day, hour, minute =
> _libe_date_pattern.search(aDateString).groups()
> return (int(year), int(month), int(day), int(hour), int(minute), 0, 0, 0, 0)
>
> registerDateHandler(libeDateHandler)
>
>
> but I don't know where to place it? Presently I've inserted it
> directly in feedparser.py. What is the correct place for user
> definedfunctions?
I think it could be interesting to add a property in configuration file
for brokenh rss feed to set a specific date parser.
--
Frédéric Crozat
More information about the devel
mailing list