PDF text conversion - fix bug where it detected a site as a PDF file incorrectly Re #1392 #1393

delete-should-remove-all
dgtlmoon 2023-02-08 09:32:57 +01:00 zatwierdzone przez GitHub
rodzic ce0355c0ad
commit f7f4ab314b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -153,7 +153,9 @@ class model(dict):
@property
def is_pdf(self):
# content_type field is set in the future
return '.pdf' in self.get('url', '').lower() or 'pdf' in self.get('content_type', '').lower()
# https://github.com/dgtlmoon/changedetection.io/issues/1392
# Not sure the best logic here
return self.get('url', '').lower().endswith('.pdf') or 'pdf' in self.get('content_type', '').lower()
@property
def label(self):