From 0933a30e3741e514efc3457510a1b300ff03ffbf Mon Sep 17 00:00:00 2001 From: quentinwolf <18410863+quentinwolf@users.noreply.github.com> Date: Mon, 13 Feb 2023 16:45:44 -0700 Subject: [PATCH] change fullUrl to use 'orig' instead of 'large' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changing fullUrl from '&name=large' to '&name=orig' since large is capped at half the resolution of orig which may not be ideal for scraping/archiving. Large images are 2048px x 1365px Original images are up to 4096px × 2730px Alternatively one could add largeUrl as an alternative to download the Large image and utillze fullUrl as above to download the original image for those that do wish to save either versions, but I feel there is no reason for saving the middle-resolution image. --- snscrape/modules/twitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snscrape/modules/twitter.py b/snscrape/modules/twitter.py index fc3abdc..5def66f 100644 --- a/snscrape/modules/twitter.py +++ b/snscrape/modules/twitter.py @@ -957,7 +957,7 @@ class _TwitterAPIScraper(snscrape.base.Scraper): return mKwargs = { 'previewUrl': f'{baseUrl}?format={format}&name=small', - 'fullUrl': f'{baseUrl}?format={format}&name=large', + 'fullUrl': f'{baseUrl}?format={format}&name=orig', } if medium.get('ext_alt_text'): mKwargs['altText'] = medium['ext_alt_text']