mirror of
https://github.com/nexus-stc/hyperboria
synced 2025-01-02 06:55:49 +01:00
10 lines
192 B
Python
10 lines
192 B
Python
|
from pdfminer.high_level import extract_text
|
||
|
|
||
|
|
||
|
def is_pdf(path_to_file):
|
||
|
try:
|
||
|
extract_text(path_to_file, maxpages=1)
|
||
|
return True
|
||
|
except Exception:
|
||
|
return False
|