Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,14 +56,14 @@ def download_pdf():
|
|
| 56 |
# print(parsed_params)
|
| 57 |
# encoded_pdf_link = parsed_params.get('pdfLink', [None])[0]
|
| 58 |
# Get PDF link and keyword from finddata()
|
| 59 |
-
|
| 60 |
|
| 61 |
-
if not
|
| 62 |
return "Missing pdfLink parameter.", 400
|
| 63 |
|
| 64 |
# Decode the URL-encoded PDF link
|
| 65 |
-
pdf_link = urllib.parse.unquote(encoded_pdf_link)
|
| 66 |
-
print("Extracted PDF Link:", pdf_link)
|
| 67 |
|
| 68 |
try:
|
| 69 |
# Use InitialMarkups to extract content
|
|
|
|
| 56 |
# print(parsed_params)
|
| 57 |
# encoded_pdf_link = parsed_params.get('pdfLink', [None])[0]
|
| 58 |
# Get PDF link and keyword from finddata()
|
| 59 |
+
pdf_link = finddata()
|
| 60 |
|
| 61 |
+
if not pdf_link:
|
| 62 |
return "Missing pdfLink parameter.", 400
|
| 63 |
|
| 64 |
# Decode the URL-encoded PDF link
|
| 65 |
+
# pdf_link = urllib.parse.unquote(encoded_pdf_link)
|
| 66 |
+
# print("Extracted PDF Link:", pdf_link)
|
| 67 |
|
| 68 |
try:
|
| 69 |
# Use InitialMarkups to extract content
|