Quellcode durchsuchen

fix (main): url link detection conflicting with gui **param

Rongxin vor 1 Jahr
Ursprung
Commit
772b0130fd
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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)