All items in feeds marked as hidden
Gregory Watts
gregory.watts at gmail.com
Tue Jul 18 05:09:44 EST 2006
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?
Regards,
Gregory
More information about the devel
mailing list