[Michele Weigle](https://twitter.com/weiglemc) has a nice thread on archiving `t.co` links into the Internet Archive running an Internet Archive service that archives URLs in a Google Sheets spreadsheet: https://twitter.com/weiglemc/status/1593698822257102851 Her script prepares the list of `t.co` URLs using `awk`: https://gist.github.com/weiglemc/312a11356420b3bc4c8e196e8454002a The idea from that script might be a thing you want to include in your Python script.