Jump to content
UBot Underground

[Help] Downloading A File Not Working


Recommended Posts

Hi everyone! I need help with downloading a file. I set the bot to click the download button but nothing comes up. Also when I interact with the window, a new window comes up asking me where I want to save the file. Any help would be greatly appreciated thank you so much!

Link to post
Share on other sites

Okay i just tried it and its still not working when I set the element to the download button, the bot doesnt open a "save" window

Link to post
Share on other sites

posting your code + website may help trouble shoot your problem better.

 

I understand its not always possible to do that.. just saying...

clear table(&links)

create table from file("{$special folder("Application")}/YTID.csv",&links)

set(#row,0,"Global")

click(<id="save-dropdown">,"Left Click","No")

loop($table total rows(&links)) {

    close page

    navigate("http://ytcomments.klostermann.ca/","Wait")

    wait for element(<url field>,"","Appear")

    type text(<url field>,"https://www.youtube.com/watch?v={$table cell(&links,#row,0)}","Standard")

    wait for element(<id="scrape-btn">,"","Appear")

    click(<id="scrape-btn">,"Left Click","No")

    wait for element($element offset(<class="iCheck-helper">,0),"","Appear")

    focus($element offset(<class="iCheck-helper">,0))

    click($element offset(<class="iCheck-helper">,2),"Left Click","No")

    click($element offset(<class="iCheck-helper">,6),"Left Click","No")

    click($element offset(<class="iCheck-helper">,3),"Left Click","No")

    click(<id="save-dropdown">,"Left Click","No")

    wait for element(<id="save-dropdown-contents">,"","Appear")

    click(<id="save-csv">,"Left Click","No")

    click(<download="comments-{$table cell(&links,#row,0)}.csv">,"Left Click","No")

    wait(2)

    plugin command("WindowsCommands.dll", "set dialog text", "Save", "File name:", "comments-{$table cell(&links,#row,0)}.csv")

    wait(2)

    plugin command("WindowsCommands.dll", "click dialog button", "Save", "Save")

    increment(#row)

}

Link to post
Share on other sites

I have simplified your code above to just focus on the problem..which is downloading the file to disk,

 

take a look.. this worked on my side.. I was able to successfully download the file as csv to disk.

navigate("http://ytcomments.klostermann.ca/","Wait")
type text(<url field>,"https://www.youtube.com/watch?v=a2AGRYwyUqU","Standard")
click(<id="scrape-btn">,"Left Click","No")
loop(1) {
    click(<id="save-csv">,"Left Click","No")
    wait(1)
    plugin command("WindowsCommands.dll", "click dialog button", "Save As", "Save")
}

 

 

 I set the bot to click the download button but nothing comes up. Also when I interact with the window, a new window comes up asking me where I want to save the file.

 

I clicked on that 'red download button'  manually - and it gave a small dropdown  with 2 options -save as json or save as csv

I chose csv - and then the web page popped up the windows dialog..

 

I think your click code -

click(<id="save-csv">,"Left Click","No")
 
directly brought up this dialog which is what is needed to save the file to disk.
 
Next I followed up your click command with a windows automation command to save file to disk.
 
I hope this helps.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...