Skip to content

Commit 2ad7e61

Browse files
committed
AdWords v201710 release.
1 parent 0f2e88e commit 2ad7e61

File tree

122 files changed

+11205
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+11205
-24
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
8.1.0 -- 10/11/17
2+
* Added support for AdWords v201710.
3+
* Resolved issues:
4+
- Issue 224: https://github.com/googleads/googleads-python-lib/issues/224
5+
- Issue 228: https://github.com/googleads/googleads-python-lib/issues/228
6+
17
8.0.0 -- 8/22/17
28
* Removed support and examples for AdWords v201609.
39
* Resolved issues:

examples/adwords/v201702/advanced_operations/add_click_to_download_ad.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ def main(client, ad_group_id):
4343
# BASE64 encoded form. Here we download a demo image and encode it for this
4444
# ad.
4545
opener = urllib2.build_opener(*client.proxy_config.GetHandlers())
46-
image_data = base64.b64encode(opener.open('http://goo.gl/9JmyKk').read())
46+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
47+
image_data = (base64.b64encode(opener.open('http://goo.gl/9JmyKk').read())
48+
.decode('utf-8'))
4749

4850
# Create the template elements for the ad. You can refer to
4951
# https://developers.google.com/adwords/api/docs/appendix/templateads

examples/adwords/v201702/advanced_operations/add_html5_ad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def main(client, ad_group_id):
101101
def GetBase64EncodedHTML5ZipFromUrl(url):
102102
"""Retrieve zip file from the given URL."""
103103
response = urllib2.urlopen(url)
104-
return base64.b64encode(response.read())
104+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
105+
return base64.b64encode(response.read()).decode('utf-8')
105106

106107

107108
if __name__ == '__main__':

examples/adwords/v201702/advanced_operations/add_responsive_display_ad.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def main(client, ad_group_id):
4242
try:
4343
# Create image.
4444
opener = urllib2.build_opener(*client.proxy_config.GetHandlers())
45-
image_data = base64.b64encode(opener.open('https://goo.gl/3b9Wfh').read())
45+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
46+
image_data = (base64.b64encode(opener.open('https://goo.gl/3b9Wfh').read())
47+
.decode('utf-8'))
4648
image = {
4749
'type': 'IMAGE',
4850
'data': image_data,

examples/adwords/v201702/misc/upload_media_bundle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def main(client):
5050
def GetBase64EncodedHTML5ZipFromUrl(url):
5151
"""Retrieve zip file from the given URL."""
5252
response = urllib2.urlopen(url)
53-
return base64.b64encode(response.read())
53+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
54+
return base64.b64encode(response.read()).decode('utf-8')
5455

5556

5657
if __name__ == '__main__':

examples/adwords/v201705/advanced_operations/add_click_to_download_ad.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ def main(client, ad_group_id):
4343
# BASE64 encoded form. Here we download a demo image and encode it for this
4444
# ad.
4545
opener = urllib2.build_opener(*client.proxy_config.GetHandlers())
46-
image_data = base64.b64encode(opener.open('http://goo.gl/9JmyKk').read())
46+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
47+
image_data = (base64.b64encode(opener.open('http://goo.gl/9JmyKk').read())
48+
.decode('utf-8'))
4749

4850
# Create the template elements for the ad. You can refer to
4951
# https://developers.google.com/adwords/api/docs/appendix/templateads

examples/adwords/v201705/advanced_operations/add_html5_ad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def main(client, ad_group_id):
101101
def GetBase64EncodedHTML5ZipFromUrl(url):
102102
"""Retrieve zip file from the given URL."""
103103
response = urllib2.urlopen(url)
104-
return base64.b64encode(response.read())
104+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
105+
return base64.b64encode(response.read()).decode('utf-8')
105106

106107

107108
if __name__ == '__main__':

examples/adwords/v201705/advanced_operations/add_responsive_display_ad.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def main(client, ad_group_id):
4242
try:
4343
# Create image.
4444
opener = urllib2.build_opener(*client.proxy_config.GetHandlers())
45-
image_data = base64.b64encode(opener.open('https://goo.gl/3b9Wfh').read())
45+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
46+
image_data = (base64.b64encode(opener.open('https://goo.gl/3b9Wfh').read())
47+
.decode('utf-8'))
4648
image = {
4749
'type': 'IMAGE',
4850
'data': image_data,

examples/adwords/v201705/misc/upload_media_bundle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def main(client):
5050
def GetBase64EncodedHTML5ZipFromUrl(url):
5151
"""Retrieve zip file from the given URL."""
5252
response = urllib2.urlopen(url)
53-
return base64.b64encode(response.read())
53+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
54+
return base64.b64encode(response.read()).decode('utf-8')
5455

5556

5657
if __name__ == '__main__':

examples/adwords/v201708/advanced_operations/add_click_to_download_ad.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ def main(client, ad_group_id):
4343
# BASE64 encoded form. Here we download a demo image and encode it for this
4444
# ad.
4545
opener = urllib2.build_opener(*client.proxy_config.GetHandlers())
46-
image_data = base64.b64encode(opener.open('http://goo.gl/9JmyKk').read())
46+
# Note: The utf-8 decode is for 2to3 Python 3 compatibility.
47+
image_data = (base64.b64encode(opener.open('http://goo.gl/9JmyKk').read())
48+
.decode('utf-8'))
4749

4850
# Create the template elements for the ad. You can refer to
4951
# https://developers.google.com/adwords/api/docs/appendix/templateads

0 commit comments

Comments
 (0)