From b3dfa41df6ec715b51b65cecb87ba18eec077e56 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Thu, 15 Aug 2019 18:21:54 -0400 Subject: [PATCH] GAM user agent on short URL --- src/gam.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gam.py b/src/gam.py index 8394ce06..2fca9f55 100755 --- a/src/gam.py +++ b/src/gam.py @@ -7634,7 +7634,8 @@ class ShortURLFlow(google_auth_oauthlib.flow.InstalledAppFlow): simplehttp = _createHttpObj() simplehttp.timeout = 10 url_shortnr = 'https://gam-shortn.appspot.com/create' - headers = {'Content-Type': 'application/json'} + headers = { 'Content-Type': 'application/json', + 'user-agent': GAM_INFO } try: resp, content = simplehttp.request(url_shortnr, 'POST', '{"long_url": "%s"}' % long_url, headers=headers) except: