Untitled
unknown
plain_text
a year ago
365 B
6
Indexable
import requests import json url_to_shorten = "https://w.amazon.com/index.php/User:Pfusu" api_endpoint = "http://tiny.amazon.com/submit/url" headers = {"Accept": "application/json"} payload = {"name": url_to_shorten} response = requests.post(api_endpoint, headers=headers, data=payload) shortened_url = json.loads(response.text)['short_url'] print(shortened_url)
Editor is loading...
Leave a Comment