Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from adspygoogle.common import SOAPPY
- from adspygoogle.common.Errors import Error
- from adspygoogle.adwords.AdWordsClient import AdWordsClient
- from pprint import pprint
- headers = {
- 'email' : 'user@another_domain.com',
- 'password' : 'canhurtyoureyes',
- 'useragent' : "UA",
- }
- headers['developerToken'] = 'user@another_domain.com' + '++' + 'USD'
- headers['applicationToken'] = 'apptoken_works_with_v13'
- namespace = 'https://adwords-sandbox.google.com'
- apiver = 'v201008'
- client = AdWordsClient(headers, {'soap_lib' : SOAPPY, 'home' : '.'})
- keyword_tool_service = client.GetTargetingIdeaService(namespace, apiver)
- estimator_service = client.GetTrafficEstimatorService(namespace, apiver)
- selector = {
- 'searchParameters': [
- {
- 'type': 'RelatedToKeywordSearchParameter',
- 'keywords': [
- {
- 'text': 'global economy',
- 'matchType': 'BROAD'
- }]
- },
- {
- 'type': 'LanguageTargetSearchParameter',
- 'languageTargets': [{'languageCode' : 'en_US'}]
- },
- {
- 'type': 'CountryTargetSearchParameter',
- 'countryTargets': [{'countryCode' : 'us'}]
- }
- ],
- 'ideaType': 'KEYWORD',
- 'requestType': 'IDEAS',
- 'paging': {
- 'startIndex': '0',
- 'numberResults': '5'
- }
- }
- variation_lists = keyword_tool_service.Get(selector)
- pprint(dir(variation_lists))
Add Comment
Please, Sign In to add comment