import requests def upload(data): url = 'https://paste2.org/' response = requests.post(url, data={'data': data}) response.raise_for_status() # Extract the URL of the uploaded paste from the response paste_url = None for line in response.text.splitlines(): if line.startswith('