Created
April 10, 2017 19:27
-
-
Save evo42/3e844f0b06faeb6c90568e65d99f4ba9 to your computer and use it in GitHub Desktop.
FirstData / BAWAG smartCash ATM locations in AT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| // Export a list of ATMs supporting BitATM via smartCash in Austria | |
| // | |
| // navigate to the ATM listing page: | |
| https://www.firstdata.com/de_at/customer-center/atm-locator.html | |
| // | |
| // run this code in the browser developer console | |
| // | |
| */ | |
| // extract ATM list | |
| var atmList = []; | |
| var atmExport = 'AT-BitATM-list-firstData.json'; | |
| var atmType = {'smartCash': '6'}; | |
| var count = {'total': 0}; | |
| console.log('* * * * * * * * * * * * * * * * * * * * '); | |
| console.log('* ATM locations smartCash AT'); | |
| console.log('* * * * * * * * * * * * * * * * * * * * '); | |
| $($("table tr").slice(1, $("table tr").length)).each(function() { | |
| var atm = {}; | |
| atm.id = this.cells[0].textContent; | |
| atm.name = this.cells[1].textContent; | |
| atm.zip = this.cells[3].textContent; | |
| atm.city = this.cells[4].textContent; | |
| atm.street = this.cells[2].textContent; | |
| atm.bitcash = 'smartCash'; | |
| atmList.push(atm); | |
| count.total++; | |
| }); | |
| console.log('# ' + count.total + ' firstData ATMs in total'); | |
| console.log('* * * * * * * * * * * * * * * * * * * * '); | |
| console.log('* Download ' + atmExport + ' ...'); | |
| console.log('* * * * * * * * * * * * * * * * * * * * '); | |
| /* | |
| // helper stuff | |
| // console.save(data, 'filename.json') | |
| // http://stackoverflow.com/questions/11849562 | |
| */ | |
| !function(e){e.save=function(o,n){if(!o)return void e.error("Console.save: No data");n||(n="console.json"),"object"==typeof o&&(o=JSON.stringify(o,void 0,4));var t=new Blob([o],{type:"text/json"}),a=document.createEvent("MouseEvents"),d=document.createElement("a");d.download=n,d.href=window.URL.createObjectURL(t),d.dataset.downloadurl=["text/json",d.download,d.href].join(":"),a.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),d.dispatchEvent(a)}}(console); | |
| console.save(atmList, atmExport); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment