diff --git a/jobboards/RegionCentre.py b/jobboards/RegionCentre.py index 90a5785..c1061ef 100755 --- a/jobboards/RegionCentre.py +++ b/jobboards/RegionCentre.py @@ -37,7 +37,7 @@ def fetch_url(self, url): xmldoc = minidom.parse(os.path.join(self.processingDir, filename)) MainPubDate = xmldoc.getElementsByTagName('pubDate')[0].firstChild.data - epochPubDate = datetime.datetime.strptime(MainPubDate, "%a, %d %b %Y %H:%M:%S +0200").strftime('%s') + epochPubDate = datetime.datetime.strptime(MainPubDate, "%a, %d %b %Y %H:%M:%S +0100").strftime('%s') print "main date " + MainPubDate # if (epochPubDate <= self.lastFetchDate): diff --git a/jobboards/RegionOuest.py b/jobboards/RegionOuest.py index 0db74b8..877079f 100755 --- a/jobboards/RegionOuest.py +++ b/jobboards/RegionOuest.py @@ -37,7 +37,7 @@ def fetch_url(self, url): xmldoc = minidom.parse(os.path.join(self.processingDir, filename)) MainPubDate = xmldoc.getElementsByTagName('pubDate')[0].firstChild.data - epochPubDate = datetime.datetime.strptime(MainPubDate, "%a, %d %b %Y %H:%M:%S +0200").strftime('%s') + epochPubDate = datetime.datetime.strptime(MainPubDate, "%a, %d %b %Y %H:%M:%S +0100").strftime('%s') print "main date " + MainPubDate # if (epochPubDate <= self.lastFetchDate): diff --git a/jobboards/RegionSudOuest.py b/jobboards/RegionSudOuest.py index 260f328..2be8ccd 100755 --- a/jobboards/RegionSudOuest.py +++ b/jobboards/RegionSudOuest.py @@ -34,10 +34,13 @@ def fetch_url(self, url): filename = url.split('/')[-1] utilities.download_file(url, self.processingDir) - xmldoc = minidom.parse(os.path.join(self.processingDir, filename)) + fileXML = open(os.path.join(self.processingDir, filename), 'r+') + fileXML = fileXML.read() + fileXML = fileXML.replace('US-ASCII','iso-8859-1') + xmldoc = minidom.parseString(fileXML) MainPubDate = xmldoc.getElementsByTagName('pubDate')[0].firstChild.data - epochPubDate = datetime.datetime.strptime(MainPubDate, "%a, %d %b %Y %H:%M:%S +0200").strftime('%s') + epochPubDate = datetime.datetime.strptime(MainPubDate, "%a, %d %b %Y %H:%M:%S +0100").strftime('%s') print "main date " + MainPubDate # if (epochPubDate <= self.lastFetchDate):