Jump to content



Photo

[HOW TO] Download CSV from Adwords Keyword Planner

adwords keyword planner download csv

  • Please log in to reply
6 replies to this topic

#1 UBotDev

UBotDev

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 1395 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 18 September 2013 - 07:27 AM

I saw a lot of people asking the question from title, so I've decided to share this code:

click($element offset(<(innertext="Download" AND class="goog-button-base-content")>, 0), "Left Click", "No")
wait for browser event("Everything Loaded", "")
wait for element(<id="gwt-debug-adwords-editor-csv-radio-input">, "", "Appear")
click(<id="gwt-debug-adwords-editor-csv-radio-input">, "Left Click", "No")
wait for browser event("Everything Loaded", "")
click(<id="gwt-debug-download-button-content">, "Left Click", "No")
wait for browser event("Everything Loaded", "")
wait for element(<id="gwt-debug-download-link">, "", "Appear")
set(#URL, $scrape attribute(<id="gwt-debug-download-link">, "fullhref"), "Global")
in shared browser {
    navigate(#URL, "Don\'t Wait")
    wait for browser event("Everything Loaded", 5)
    save downloaded file("C:\\test.csv")
}

Here is the video of script in action: http://screencast.com/t/a1jb4GVFN8o

 

However, you need to manually log in, start the search and add keywords to output file if needed, then you are ready to run the script above.

 

I've coded this script today and it worked when I tested it; I remember that old Adwords Keyword Tool didn't always work, and bot had to re-start download if the file wasn't saved, so you may experience similar problems with new Planner tool.

 

However, I hope you find this useful.

 

EDIT: I've updated the code and it should make downloading faster.


CLICK UBotDev.com - Download FREE UBot Plugins!

______________________________________________

 


#2 Gogetta

Gogetta

    Advanced Member

  • Moderators
  • 921 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 18 September 2013 - 08:41 AM

i didn't even think to try the in shared browser command, I'll have to test it out and see how this works. Anyway, the http post plugin worked good also.

 

Thanks for the share,

 

Edit: Not intended to hijack your thread or anything, just adding to it. Anyway, this works flawlessly and works every time to download the csv. Requires the http post plugin though.The variables are set to local so just add the define to your scrip and set the parameters.

Attached Files



#3 UBotDev

UBotDev

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 1395 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 18 September 2013 - 08:59 AM

i didn't even think to try the in shared browser command, I'll have to test it out and see how this works. Anyway, the http post plugin worked good also.

 

Thanks for the share,

 

Edit: Not intended to hijack your thread or anything, just adding to it. Anyway, this works flawlessly and works every time to download the csv. Requires the http post plugin though.The variables are set to local so just add the define to your script.

I'm using shared (new) browser only to keep main browser page active after download (download command closes the browser and UBot is unable to interact with it anymore). Else I think the trick is that you need to navigate to CSV file instead of trying to download (I got a strange server error when I tried to download directly).

 

The script I published also worked in all the test that I have ran, I'm just mentioning that I had some problems with old Keyword Tool, (it might be due to the fact that I was downloading hundreds of CSV per day).

 

Np at all, thanks for sharing that version.


CLICK UBotDev.com - Download FREE UBot Plugins!

______________________________________________

 


#4 the_way

the_way

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 557 posts
  • OS:Windows 8
  • Total Memory:3Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 18 September 2013 - 03:40 PM

superb share, cheers ubotdev  :P


2VHxTj5.png


#5 Ron Borne

Ron Borne

    Newbie

  • Members
  • Pip
  • 2 posts
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.5+, unsure
  • License:Professional Edition

Posted 18 January 2014 - 03:28 AM

It appears that the kw planner interface has changed somewhat.  The current code does not work.

 

Would you be kind to take a look and post a revision?

 

Thanks in advance!



#6 UBotDev

UBotDev

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 1395 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 21 January 2014 - 07:58 PM

It appears that the kw planner interface has changed somewhat.  The current code does not work.

 

Would you be kind to take a look and post a revision?

 

Thanks in advance!

The first part of code actually strill works, but I spent a few minutes on 2nd part and I couldn't get it working. The problem is that for some reason google doesn't recognize download request as we were logged in, that's why UBot downloads login page instead of csv.

 

If you really need it you can try further; here is the code I came up with:

click($element offset(<class=w"aw-toolbelt-downloadButton *">, 1), "Left Click", "No")
wait for element(<id="gwt-debug-download-button-content">, "", "Appear")
click(<id="gwt-debug-download-button-content">, "Left Click", "No")
wait for browser event("DOM Ready", "")
wait for element(<id="gwt-debug-retrieve-download-content">, "", "Appear")
wait for browser event("DOM Ready", "")
allow popups("Yes")
click(<id="gwt-debug-retrieve-download-content">, "Left Click", "No")
wait for browser event("Everything Loaded", "")
wait for element(<(tagname="iframe" AND src=w"*.csv")>, "", "Appear")
set(#URL, $scrape attribute(<(tagname="iframe" AND src=w"*.csv")>, "src"), "Global")
in shared browser {
    download file(#URL, "c:\\test.csv")
}

Btw, it's really strange, since if I manually navigate to scraped #URL I get a csv file. Because of that I think there might be a way around, since UBot should still have Google cookies for login.


CLICK UBotDev.com - Download FREE UBot Plugins!

______________________________________________

 


#7 jamesfar

jamesfar

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 527 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 19 April 2014 - 08:02 AM

i didn't even think to try the in shared browser command, I'll have to test it out and see how this works. Anyway, the http post plugin worked good also.

 

Thanks for the share,

 

Edit: Not intended to hijack your thread or anything, just adding to it. Anyway, this works flawlessly and works every time to download the csv. Requires the http post plugin though.The variables are set to local so just add the define to your scrip and set the parameters.

 

what to fill in URL to Download http://screencast.com/t/oRG8pO57OU4 ?


The best proxies provider so far.
* Fast and Great Support. * No software restriction.

* It is favourite proxies provider on GSA forum. * Almost 2000 positive reviews on fiverr. * More than 1000s active clients

 

Try It !






Also tagged with one or more of these keywords: adwords, keyword planner, download, csv

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users