@staticmethod
def _google_url_shortener(original_url):
try:
data = json.dumps({'longUrl': original_url})
result = requests.post(conf.GoogleURL, headers={
'Content-Type': 'application/json'}, data=data)
shortened_url = result.json()['id']
return shortened_url
except Exception as e:
print('err {}'.format(e))
return original_url
Я использую Google URL Shortener, чтобы сделать мои URL короче, от Google, он говорит 1 000 000 запросов в день, к сожалению, я получил 403 ERROR после того, как было отправлено более 2500 запросов. Не помогает даже сброс запроса TPS до 0.5
Кто-нибудь может помочь?
This key is unrestricted. To prevent unauthorized use and quota theft, restrict your key. Key restriction lets you specify which web sites, IP addresses, or apps can use this key
- person Haifeng Zhang   schedule 24.11.2017