I saw the following post on reddit related to downloading data from banks. 
Maybe it will be helpful to you:

I'm new to the ledger-cli ecosystem, and spent many hours recently trying 
to get this all sorted out. I now have a more-or-less fully automated setup 
that works as such:

    Component 1 is a small bash script that invokes plaid2qif to download a 
CSV of all transactions for each all of my bank accounts, investment 
accounts, and credit card accounts. https://github.com/ebridges/plaid2qif

Plaid is a back-end system that implements a common API for most financial 
institutions, so that you don't have to write and maintain separate chase 
vs. citibank vs. bofa scrapers. You can link up to 100 accounts with the 
development account for free.

    Once I have a CSV with each account's transactions, I have another 
short script that invokes into-ledger on each file and imports all of the 
data

On Thursday, April 12, 2018 at 6:18:29 PM UTC-4, Jacques Gagnon wrote:
>
> I pretty much gave up, much easier to download the ofx manualy.
>
> Jacques Gagnon
> GTalk/E-Mail: [email protected] <javascript:>
> WLM (MSN): [email protected] <javascript:>
>
> On Thu, Apr 12, 2018 at 6:12 PM, <[email protected] <javascript:>> 
> wrote:
>
>> Hello Jacques,
>>
>> I read your messages with a lots of interest and i also trying to connect 
>> and scrap my bank statement on td canada.
>> I tried weboob which have a complete solutions for banks, but could not 
>> get to the login page, it seems than the website make your browser run a 
>> lots of operations way before you get the login prompt...
>>
>> Have you been able to get thru this first part with python...
>>
>> best regards
>> Nicolas
>>  
>>
>> On Friday, November 6, 2015 at 2:48:18 PM UTC+1, Jacques Gagnon wrote:
>>>
>>> Btw I come across this for bank of america:
>>> https://www.coshx.com/blog/2012/11/30/casperjs-automation/
>>>
>>> Haven't got time yet to adapt it for my needs.
>>>
>>> But I don't like the fact it use a dead project (CasperJS)
>>>
>>> Also the download part is kind of a hack since PhantomJS dont have 
>>> native support for download. (Download without direct link, ie resulting 
>>> from a POST)
>>> They got experimental support for download in a branch however, but it 
>>> never got in main line and it date from 2013 so probably wont happen.
>>>
>>> Nightmare look like the most future proof project to use, no download 
>>> support yet, but at least the headless browser they use Electron (base on 
>>> chromium) do have download support.
>>>
>>> Jacques Gagnon
>>> GTalk/E-Mail: [email protected]
>>> WLM (MSN): [email protected]
>>>
>>> On Fri, Nov 6, 2015 at 8:41 AM, Martin Blais <[email protected]> wrote:
>>>
>>>> No idea, but the portion that pulls the file down should be reusable
>>>>
>>>>
>>>> On Thu, Nov 5, 2015 at 10:40 PM, Dave Stephens <[email protected]> 
>>>> wrote:
>>>>
>>>>> Does ledger-autosync work with Beancount? 
>>>>>
>>>>> On Tue, 3 Nov 2015 at 13:24 Simon Michael <[email protected]> wrote:
>>>>>
>>>>>> ledger-autosync will also process an OFX file you downloaded yourself.
>>>>>>
>>>>>> On 11/3/15 8:46 AM, Jacques Gagnon wrote:
>>>>>> > ledger-autosync is for bank who support the ofx protocol,
>>>>>> > we dont have that in Canada, only so random website that once 
>>>>>> logged in you
>>>>>> > can download the ofx file
>>>>>> >
>>>>>> > I'll take a look a weboob or PhantomJS
>>>>>> > I wanted to stay around python, but I'll use what it take and adapt 
>>>>>> it to
>>>>>> > my need.
>>>>>> >
>>>>>> > We might not end up with script for all banks, but at least with a 
>>>>>> couple
>>>>>> > examples someone would be able hack something for its own need.
>>>>>> >
>>>>>> > On Tuesday, November 3, 2015 at 11:03:44 AM UTC-5, Simon Michael 
>>>>>> wrote:
>>>>>> >>
>>>>>> >> https://gitlab.com/egh/ledger-autosync is pretty good, and/or the
>>>>>> >> ofxclient tool it uses.
>>>>>> >>
>>>>>> >>
>>>>>> >
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Beancount" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to [email protected].
>>>>>> To post to this group, send email to [email protected].
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/beancount/n1b8m6%24hu1%241%40ger.gmane.org
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Beancount" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/beancount/CALRNXuF%2BjkPv10W17GJChaNwNgc1endq3Af1LGGK89pZdiwS6A%40mail.gmail.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/beancount/CALRNXuF%2BjkPv10W17GJChaNwNgc1endq3Af1LGGK89pZdiwS6A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Beancount" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/beancount/CAK21%2BhO%3D9FfbYTx91ZVhHVV0KipJH1YDX3QDWP18g-SJtjUJ%2BA%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhO%3D9FfbYTx91ZVhHVV0KipJH1YDX3QDWP18g-SJtjUJ%2BA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beancount/80197f45-f145-48d3-adce-da6bc5dca8b3%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/beancount/80197f45-f145-48d3-adce-da6bc5dca8b3%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/b8b57c70-be3b-4430-aff9-8a5d2dc427e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to