Biks 9 Posted June 17, 2020 Report Share Posted June 17, 2020 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. 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> Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.