Datasets:
Guillaume Raille
commited on
add docstring for download function
Browse files
main.py
CHANGED
|
@@ -6,6 +6,7 @@ RAW_PDF_URLS = [
|
|
| 6 |
]
|
| 7 |
|
| 8 |
def download_pdf(url: str, output_path: str) -> None:
|
|
|
|
| 9 |
with httpx.stream("GET", url, follow_redirects=True) as response:
|
| 10 |
response.raise_for_status() # ensure we got a 200 OK
|
| 11 |
with open(output_path, "wb") as f:
|
|
|
|
| 6 |
]
|
| 7 |
|
| 8 |
def download_pdf(url: str, output_path: str) -> None:
|
| 9 |
+
"""Download a PDF from the given URL and save it to the specified output path."""
|
| 10 |
with httpx.stream("GET", url, follow_redirects=True) as response:
|
| 11 |
response.raise_for_status() # ensure we got a 200 OK
|
| 12 |
with open(output_path, "wb") as f:
|