Last active
August 4, 2021 17:32
-
-
Save yanissi/8cf11a2caae9ac24029219590d338b5b to your computer and use it in GitHub Desktop.
This file contains 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
## Fixed Height Export | |
import requests | |
import urllib.request | |
token = "9HGDNG5-50E40Y9-MRTE5HC-HRWHPPB" | |
url = "https://www.dailymail.co.uk/news/article-9744405/Melbourne-best-city-working-home-Covid-losing-crown-liveable-city.html" | |
result = requests.get(f"https://shot.screenshotapi.net/screenshot?token={token}&url={url}&height=3000&output=json&no_cookie_banners=true&block_ads=true") | |
urllib.request.urlretrieve(result.json()['screenshot'], "local-filename.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment