Hello,

I was wondering if it is possible at the moment to use Google Ads API v8 in 
Python to download the assets (.html, .jpg, .js, etc.) in a .zip file for 
an HTML5 ad.

I could do it for image ads pretty straightforward, since I can get the 
*ad_group_ad.ad.image_ad.image_url* field, then retrieve the url and save 
as a .png. But for HTML5 ad, there would be no 
*ad_group_ad.ad.image_ad.image_url* field. I tried using the 
*ad_group_ad.ad.display_upload_ad.media_bundle* field targeting at one 
specific HTML5 ad within our Google Ads account, and I was able to retrieve 
the asset resource name in the format of 
"customers/(account_id)/assets/(asset_id)", then I do (in Python):

asset_service = client.get_service("AssetService", version="v8")
asset = asset_service.get_asset(resource_name={resource_name of that HTML5 
ad})
print(asset)
print(asset.media_bundle_asset.data)

And I can indeed retrieve an Asset object by running the above code, but 
there is no data in *asset.media_bundle_asset.data*, which is supposed to 
be a 'bytes' class in Python. I was wondering if I'm on the right path of 
getting the asset files for an HTML5 ad this way, or if there might be 
another way.

In addition, I did notice that, in Google Ads platform, if I click on an 
HTML5 ad, I can get an ad preview link. If I open this preview link, then I 
get to see this HTML5 ad, and I can right click this entire web page and 
save as a folder of files, which is exactly what I'm looking for from 
downloading from Google Ads API programmatically. So I was also wondering 
if I could get this preview link somewhere from Google Ads API.

Thank you!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/59cef140-1031-464d-b7c1-46dddfdb58c6n%40googlegroups.com.
  • Ho... Jerry Dou
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to