פרויקט התממשקות עם הבנק
-
תודה
עכשיו השגיאה היאusername: <*****>, ^ SyntaxError: Unexpected token < at new Script (vm.js:79:7) at createScript (vm.js:251:10) at Object.runInThisContext (vm.js:303:10) at Module._compile (internal/modules/cjs/loader.js:657:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:283:19)
-
אוקיי הבנתי את כוונתך, הייתי צריך למחוק את ה<>
אז מחקתי ועכשיו יש שגיאהconst scrapeResult = await scraper.scrape(credentials); ^^^^^ SyntaxError: await is only valid in async function at new Script (vm.js:79:7) at createScript (vm.js:251:10) at Object.runInThisContext (vm.js:303:10) at Module._compile (internal/modules/cjs/loader.js:657:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:283:19)
-
תודה רבה התקדמנו לשגיאה הבאה..
מקווה שאני לא משגע אותך(node:28869) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome! /root/node_modules/puppeteer/.local-chromium/linux-637110/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md at onClose (/root/node_modules/puppeteer/lib/Launcher.js:342:14) at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:331:50) at Interface.emit (events.js:187:15) at Interface.close (readline.js:379:8) at Socket.onend (readline.js:157:10) at Socket.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1094:12) at process._tickCallback (internal/process/next_tick.js:63:19) (node:28869) 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(). (rejection id: 1) (node:28869) [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.
-
@yossiz תודה
@WWW כעשרים שניות בערך. אני מאמין שבלינוקס זה יותר מהריש עדיין שגיאה בלינוקס
(node:1306) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome! [1317:1317:0306/124807.187852:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md at onClose (/root/node_modules/puppeteer/lib/Launcher.js:342:14) at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:331:50) at Interface.emit (events.js:187:15) at Interface.close (readline.js:379:8) at Socket.onend (readline.js:157:10) at Socket.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1094:12) at process._tickCallback (internal/process/next_tick.js:63:19) (node:1306) 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(). (rejection id: 1) (node:1306) [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.
אני רואה שיש דף בגיטהב של troubleshooting, לא הבנתי הכל שמה אבל אני מנסה לאט לאט
-
נכון
אז עברתי ליוזר אחר, והגיעה שגיאה חדשה..(node:2056) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome! MobaXterm X11 proxy: Unsupported authorisation protocol (chrome:2067): Gtk-WARNING **: 12:58:14.700: cannot open display: localhost:11.0
-
@dovid לפי ההוראות שלך:
const createScraper = require('israeli-bank-scrapers').createScraper; const credentials = { userCode: '123456', password: '7890123' }; const options = { companyId: 'hapoalim', // mandatory; one of 'hapoalim', 'leumi', 'discount', 'otsarHahayal', 'visaCal', 'leumiCard', 'isracard', 'amex' //startDate: Date, // the date to fetch transactions from (can't be before the minimum allowed time difference for the scraper) combineInstallments: false, // if set to true, all installment transactions will be combine into the first one //showBrowser: true, // shows the browser while scraping, good for debugging (default false) verbose: true // include more debug info about in the output }; const scraper = createScraper(options); scraper.scrape(credentials).then(function(scrapeResult) { if (scrapeResult.success) { scrapeResult.accounts.forEach((account) => { console.log(`found ${account.txns.length} transactions for account number ${account.accountNumber}`); }); } else { console.error(`scraping failed for the following reason: ${scrapeResult.errorType}`); } });
נסיתי גם username לפנ"כ ואותה שגיאה.
-