Jump to content



Photo

Starting A Download From Overdrive.com


  • Please log in to reply
No replies to this topic

#1 Biks

Biks

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 219 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.0
  • License:Professional Edition

Posted 17 June 2020 - 08:48 AM

I'm trying to automatically download .ascm (epub's) files from the Overdrive library network. I just can't click the last button to click to actually START the download.

 

is5GkSh.png

This script gets you logged into a temporary account # and gets you to the account loan page where I want to download it. When I run it in NODE mode, it works, but not in the sequence. I've also tried moving the mouse over the button (works in NODE mode), not in the sequence. Scraping the URL then downloading doesn't seem to work either. What am I doing wrong?

 

Note: this is using a temporary library card # - good for 2 weeks starting at June 17th. If other people are monkeying with this particular script, you may have to RETURN the book first to get here. (or just download another ebook)

navigate("https://sails.overdrive.com/account/ozone/sign-in","Wait")
click(<innertext="SAILS Library Patrons">,"Left Click","No")
wait(2)
comment("Note: This # is good for only 2 weeks (June 17)")
type text(<username field>,22043000141061,"Standard")
wait(1)
type text(<password field>,7777,"Standard")
wait(1)
click(<login button>,"Left Click","No")
wait for browser event("DOM Ready","")
wait for browser event("Everything Loaded","")
wait(5)
navigate("https://sails.overdrive.com/sails-wareham/content/media/429609","Wait")
wait for browser event("Everything Loaded","")
wait(1)
click(<aria-label="Borrow An Essay on Satire, Particularly on the Dunciad">,"Left Click","No")
wait(3)
click(<class="button radius secondary contrast u-allCaps borrow-button">,"Left Click","No")
wait for browser event("Everything Loaded","")
wait(3)
navigate("https://sails.overdrive.com/sails-wareham/content/account/loans","Wait")
wait for browser event("Everything Loaded","")
wait(5)
comment("Can\'t click this button HERE")
click(<innertext="Download
Open EPUB ebook">,"Left Click","No")
wait(3)
plugin command("WindowsCommands.dll", "keyboard event", "Enter", "Key Press")
wait for browser event("Everything Loaded","")
wait(2)

The HTML for the button looks like this:

                <div class="main-buttons">
                    
                        
                            <a target="_blank" class="loan-button-nonkindle button radius primary downloadButton" tabindex="0" role="button"
    data-format-id="ebook-epub-open" data-media-id="429609"
    data-format-name="Open EPUB ebook">
        <b>Download</b><br/>
        <span class="dl-text">Open EPUB ebook</span>
</a>
                        
                        <div class="Loans-divider-container">
                            <div class="Loans-divider">
                                
                                <span class="Loans-orText u-allCaps">
                                    or
                                </span>
                                
                            </div>
                        </div>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users