|
import httpx |
|
|
|
RAW_PDF_URLS = [ |
|
"https://www.ebooksgratuits.com/ebooksfrance/moliere-oeuvres_completes_1.pdf", |
|
"https://www.ebooksgratuits.com/ebooksfrance/moliere-oeuvres_completes_2.pdf", |
|
] |
|
|
|
def download_pdf(url: str, output_path: str) -> None: |
|
with httpx.stream("GET", url, follow_redirects=True) as response: |
|
response.raise_for_status() |
|
with open(output_path, "wb") as f: |
|
for chunk in response.iter_bytes(): |
|
f.write(chunk) |
|
|
|
def main(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
print("Hello from tiny-moliere!") |
|
|
|
|
|
if __name__ == "__main__": |
|
main() |
|
|