Created
December 11, 2020 06:13
-
-
Save Abhayparashar31/354ace2a57ec39fc044a00be64dc3e2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = "link-to-webpage" | |
apiKey = "your-api-key" | |
linkRequests = f"https://api.html2pdf.app/v1/generate?url={url}&apiKey={apikey}" | |
result = requests.get(linkRequests).content | |
with open("document.pdf", "wb") as handler: | |
handler.write(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment