diff --git a/fanficfare/adapters/adapter_fimfictionnet.py b/fanficfare/adapters/adapter_fimfictionnet.py index f7dd3a6b..a12f41a7 100644 --- a/fanficfare/adapters/adapter_fimfictionnet.py +++ b/fanficfare/adapters/adapter_fimfictionnet.py @@ -43,6 +43,7 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter): # The date format will vary from site to site. # http://docs.python.org/library/datetime.html#strftime-strptime-behavior + # FYI, not the only format used in this file. self.dateformat = "%d %b %Y" @staticmethod @@ -326,7 +327,7 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter): span = containingtag.find('span', title=True) dateRegex = re.search('([a-zA-Z ]+)([0-9]+)(th of|nd of|rd of)([a-zA-Z ]+[0-9]+)', span['title']) dateString = dateRegex.group(2) + dateRegex.group(4) - return datetime.strptime(dateString, "%d %B %Y") + return makeDate(dateString, "%d %B %Y") def ordinal_date_string_to_date(self, datestring): datestripped=re.sub(r"(\d+)(st|nd|rd|th)", r"\1", datestring.strip()) diff --git a/fanficfare/adapters/base_adapter.py b/fanficfare/adapters/base_adapter.py index 8ae5b594..d72d00aa 100644 --- a/fanficfare/adapters/base_adapter.py +++ b/fanficfare/adapters/base_adapter.py @@ -479,10 +479,10 @@ def makeDate(string,dateform): # just saving bytes. # fudge english month names for people who's locale is set to - # non-english. All our current sites date in english, even if - # there's non-english content. -- ficbook.net now makes that a - # lie. It has to do something even more complicated to get - # Russian month names correct everywhere. + # non-USenglish. Most current sites date in english, even if + # there's non-english content -- ficbook.net, OTOH, has to do + # something even more complicated to get Russian month names + # correct everywhere. do_abbrev = "%b" in dateform if u"%B" in dateform or do_abbrev: