martinhoefling / dkb-scraping

Download archive of bank account statements from the DKB website
MIT License
5 stars 1 forks source link

Scraping does not work #6

Open comfreak89 opened 2 years ago

comfreak89 commented 2 years ago

Using npm under windows.



> @ scrape C:\Users\pascal\Desktop\dkb-scraping
> node scrape-dkb.js

(node:7832) ExperimentalWarning: The ESM module loader is experimental.
Waiting for financialstatus header
waitFor is deprecated and will be removed in a future release. See https://github.com/puppeteer/puppeteer/issues/6214 for details and how to migrate your code.
login complete
waitFor is deprecated and will be removed in a future release. See https://github.com/puppeteer/puppeteer/issues/6214 for details and how to migrate your code.
Archive Folders:  [
  {
    label: 'Jahressteuerbescheid',
    link: 'https://www.dkb.de/DkbTransactionBanking/content/mailbox/MessageList/4800566398.xhtml?$event=gotoFolder&folderNameOrId=4800615996'
  },
  {
    label: 'Kontoauszüge',
    link: 'https://www.dkb.de/DkbTransactionBanking/content/mailbox/MessageList/4800566398.xhtml?$event=gotoFolder&folderNameOrId=4800567916'
  },
  {
    label: 'Kreditkartenabrechnungen',
    link: 'https://www.dkb.de/DkbTransactionBanking/content/mailbox/MessageList/4800566398.xhtml?$event=gotoFolder&folderNameOrId=4800567382'
  },
  {
    label: 'Mitteilungen',
    link: 'https://www.dkb.de/DkbTransactionBanking/content/mailbox/MessageList/4800566398.xhtml?$event=gotoFolder&folderNameOrId=4800569171'
  },
  {
    label: 'Steuerbescheinigungen',
    link: 'https://www.dkb.de/DkbTransactionBanking/content/mailbox/MessageList/4800566398.xhtml?$event=gotoFolder&folderNameOrId=4800569215'
  },
  {
    label: 'Vertragsdokumente',
    link: 'https://www.dkb.de/DkbTransactionBanking/content/mailbox/MessageList/4800566398.xhtml?$event=gotoFolder&folderNameOrId=4800569247'
  }
]
Downloading folder Jahressteuerbescheid
Downloading Jahressteuerbescheid links on page 1
21 newstyle links to download
(node:7832) UnhandledPromiseRejectionWarning: TypeError: link.label.replaceAll is not a function
    at downloadLink (file:///C:/Users/pascal/Desktop/dkb-scraping/download.js:87:40)
    at downloadFolderPageLinks (file:///C:/Users/pascal/Desktop/dkb-scraping/download.js:53:11)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async downloadFolder (file:///C:/Users/pascal/Desktop/dkb-scraping/download.js:38:5)
    at async download (file:///C:/Users/pascal/Desktop/dkb-scraping/download.js:8:5)
    at async file:///C:/Users/pascal/Desktop/dkb-scraping/scrape-dkb.js:12:3
(node:7832) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:7832) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
martinhoefling commented 2 years ago

Which node.js version are you using? Recent versions should have replaceAll implemented. Do you have a version older than 15?