forked from public/mirror-checker
Fix trisquel date bug
This commit is contained in:
parent
232a125139
commit
771d95814f
|
@ -16,9 +16,9 @@ class trisquel(Project):
|
||||||
if file_index == -1:
|
if file_index == -1:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
str_dates = re.findall(r'(\d{2}-\w{3}-\d{4} \d{2}:\d{2})|(\d{4}-\d{2}-\d{2} \d{2}:\d{2})', page[file_index:])
|
str_dates = re.findall(r'(\d{2,4}-\w{3}-\d{2,4} \d{2}:\d{2})|(\d{4}-\d{2}-\d{2} \d{2}:\d{2})', page[file_index:])
|
||||||
|
|
||||||
return list(datefinder.find_dates("".join(str_dates[0])))[0]
|
return list(datefinder.find_dates("".join(str_dates[0])))[0]# if len(str_dates) > 0 else None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def scrape(cls, site1, site2):
|
def scrape(cls, site1, site2):
|
||||||
|
|
Loading…
Reference in New Issue