简体   繁体   中英

How to automatically download multiple links that are controlled by javascripts?

I need to download all my 30 bank account monthly statements from Wells Fargo for my company for the year 2015. This is what Wells Fargo lets customers do now:

(1) click "Statements and Disclosures"

(2) click "Select account"

(3) click "For time period"

(4) click the pdf file of the month I want to download

(5) the pdf loads on the browser

(6) click the download button on the opened pdf

(7) click save

(8) click back button to download the next month's statement

This is too tedious and too time consuming. I use FireFox, and FireFox has an add-on called "Down Them All." This add-on works on regular links. However, the links of the monthly statements from Wells Fargo appear to go to "javascript:{0}" or similar code when I hover my mouse pointer over the links, and "Down Them All" cannot find the links.

Is there any other way to batch download?

Thank you very much for your help !!

Lisprog M

UPDATED ANSWER (2021) Here's a community-written script that will help people out with this, bunch of people had the same pain point. https://github.com/binary1230/wellsfargo-bulk-PDF-statement-downloader

ORIGINAL ANSWER: I had the same issue with their new website and I've written a small script you can run from the Chrome Developer console that does this (works as of 10/12/2017, might break if they change their site in the future).

To use this, do the following each time you have the links on-screen that you want to download:

  1. In Chrome browser, navigate to your wells fargo statement viewer and pull up the set of PDFs you want to view

  2. Press F12 to open the developer tools and click the tab at the bottom that says 'Console'

  3. Paste the following code into the developer console, then press ENTER

     $("a[data-pdf='true']").each(function(i,el) {$(el).attr('href', $(el).attr('data-url'));});

Now that this is done, you can right click on each link and click Save As... to save each PDF (or use a download manager to get them all)


I uploaded this code to https://gist.github.com/binary1230/7cfa0524d0fae7c320e3b15fc1f4f64c and there are some comments there from other Wells Fargo users with the same pain. This issue is also on their forums here at: https://www.wellsfargocommunity.com/thread/9286

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM