Browse Source

Merge branch 'main' of https://github.com/Byaidu/PDFMathTranslate

Byaidu 1 year ago
parent
commit
f8614b5f7a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pdf2zh/pdf2zh.py

+ 1 - 1
pdf2zh/pdf2zh.py

@@ -97,7 +97,7 @@ def extract_text(
     model = DocLayoutModel.load_available()
 
     for file in files:
-        if file.startswith("http://") or file.startswith("https://"):
+        if file is str and (file.startswith("http://") or file.startswith("https://")):
             print("Online files detected, downloading...")
             try:
                 r = requests.get(file, allow_redirects=True)