Fix trisquel date bug

alt-impl
Raymond Li 9 months ago
parent 232a125139
commit 771d95814f
Signed by untrusted user: r389li
GPG Key ID: A014EA89B62BBB1B
  1. 4
      projects/trisquel.py

@ -16,9 +16,9 @@ class trisquel(Project):
if file_index == -1:
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
def scrape(cls, site1, site2):

Loading…
Cancel
Save