• דף הבית
  • קטגוריות
  • פוסטים אחרונים
  • משתמשים
  • חיפוש
  • חוקי הפורום
כיווץ
תחומים

תחומים - פורום חרדי מקצועי

פרויקט התממשקות עם הבנק

מתוזמן נעוץ נעול הועבר תכנות
29 פוסטים 4 כותבים 360 צפיות
    • מהישן לחדש
    • מהחדש לישן
    • הכי הרבה הצבעות
תגובה
  • תגובה כנושא
התחברו כדי לפרסם תגובה
נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
  • שואףש מנותק
    שואףש מנותק
    שואף
    כתב ב נערך לאחרונה על ידי
    #1

    בהמשך להודעה של @Avi_av לגבי הקוד פתוח להתממשקות עם הבנק, שינסתי מותני ונכנסתי בעומק סוגיית NODEJS.

    אבל יש בעיות, ואשמח לעזרה

    התקנתי את החבילה, בפקודה

    npm install israeli-bank-scrapers --save
    

    אבל זה מחזיר לי שגיאה

    
    ERROR: Failed to download Chromium r637110! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
    { Error: unable to verify the first certificate
        at TLSSocket.onConnectSecure (_tls_wrap.js:1051:34)
        at TLSSocket.emit (events.js:189:13)
        at TLSSocket._finishInit (_tls_wrap.js:633:8)
      -- ASYNC --
        at BrowserFetcher.<anonymous> (D:\dev\nodejs\node_modules\puppeteer\lib\helper.js:108:27)
        at Object.<anonymous> (D:\dev\nodejs\node_modules\puppeteer\install.js:64:16)
        at Module._compile (internal/modules/cjs/loader.js:701:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
        at Module.load (internal/modules/cjs/loader.js:600:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
        at Function.Module._load (internal/modules/cjs/loader.js:531:3)
        at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
        at startup (internal/bootstrap/node.js:283:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' }
    npm WARN enoent ENOENT: no such file or directory, open 'D:\dev\nodejs\package.json'
    npm WARN nodejs No description
    npm WARN nodejs No repository field.
    npm WARN nodejs No README data
    npm WARN nodejs No license field.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! puppeteer@1.13.0 install: `node install.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the puppeteer@1.13.0 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\ShowF\AppData\Roaming\npm-cache\_logs\2019-03-06T09_11_14_371Z-debug.log
    

    אולי הבעייה בנטפרי
    התקנתי על השרת, והחזיר שגיאה

    
    Chromium downloaded to /root/node_modules/puppeteer/.local-chromium/linux-637110
    npm WARN saveError ENOENT: no such file or directory, open '/root/package.json'
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
    npm WARN root No description
    npm WARN root No repository field.
    npm WARN root No README data
    npm WARN root No license field.
    
    

    אבל כשאני מריץ את הסקריפט הבא

    import { createScraper } from 'israeli-bank-scrapers';
    
    const credentials = {
      username: <'******'>,
      password: <'******'>
    };
    const options = {
      companyId: 'leumi', // 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);
    const scrapeResult = await scraper.scrape(credentials);
    
    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}`);
    }
    

    זה מחזיר לי

    (function (exports, require, module, __filename, __dirname) { import { createScraper } from 'israeli-bank-scrapers';
                                                                         ^
    
    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)
    
    

    לא לזלזל, אני עושה היכרות עם NODEJS...

    ליצירת קשר: admin@i-call.me

    הידד! גישה למייל גם בלי מחשב ואינטרנט!

    תגובה 1 תגובה אחרונה
    0
  • dovidD מנותק
    dovidD מנותק
    dovid ניהול
    כתב ב נערך לאחרונה על ידי dovid
    #2

    במחשב שלך, התקן מחדש את תוכנת תעודת האבטחה של נטפרי.
    בשרת, שנה את בקוד את השורה הראשונה מ:

    import { createScraper } from 'israeli-bank-scrapers';
    

    ל

    const  createScraper = require('israeli-bank-scrapers').createScraper;
    

    אפשר ליצור קשר dovid@tchumim.com

    תגובה 1 תגובה אחרונה
    1
  • שואףש מנותק
    שואףש מנותק
    שואף
    כתב ב נערך לאחרונה על ידי
    #3

    תודה
    עכשיו השגיאה היא

      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)
    
    

    ליצירת קשר: admin@i-call.me

    הידד! גישה למייל גם בלי מחשב ואינטרנט!

    תגובה 1 תגובה אחרונה
    0
  • dovidD מנותק
    dovidD מנותק
    dovid ניהול
    כתב ב נערך לאחרונה על ידי dovid
    #4

    אתה אמור להחליף את הטקסט הזה עם שם המשתמש שלך מוקף במרכאות:

    username: "my_User",
    

    אפשר ליצור קשר dovid@tchumim.com

    תגובה 1 תגובה אחרונה
    1
  • שואףש מנותק
    שואףש מנותק
    שואף
    כתב ב נערך לאחרונה על ידי
    #5

    ברור מה השאלה
    החלפתי לכוכביות כי אין לי מספיק כסף בחשבון לחלק לכולם..

    ליצירת קשר: admin@i-call.me

    הידד! גישה למייל גם בלי מחשב ואינטרנט!

    תגובה 1 תגובה אחרונה
    0
  • שואףש מנותק
    שואףש מנותק
    שואף
    כתב ב נערך לאחרונה על ידי
    #6

    אוקיי הבנתי את כוונתך, הייתי צריך למחוק את ה<>
    אז מחקתי ועכשיו יש שגיאה

    
    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)
    
    

    ליצירת קשר: admin@i-call.me

    הידד! גישה למייל גם בלי מחשב ואינטרנט!

    תגובה 1 תגובה אחרונה
    0
  • dovidD מנותק
    dovidD מנותק
    dovid ניהול
    כתב ב נערך לאחרונה על ידי
    #7

    @שואף אמר בפרויקט התממשקות עם הבנק:

    scrapeResult

    תחליף את השורה הזו ל:

    scraper.scrape(credentials).then(function(scrapeResult ) {
      // bla bla
    });
    

    במקום את הbla bla שים את כל הקוד שמופיע אחרי השורה הזו עד סוף בלוק הפונקציה/או הדף.

    אפשר ליצור קשר dovid@tchumim.com

    תגובה 1 תגובה אחרונה
    1
  • dovidD מנותק
    dovidD מנותק
    dovid ניהול
    כתב ב נערך לאחרונה על ידי
    #8

    אגב, מציע לך לעבוד עם VSCODE. זה יותר קל.

    אפשר ליצור קשר dovid@tchumim.com

    תגובה 1 תגובה אחרונה
    1
  • שואףש מנותק
    שואףש מנותק
    שואף
    כתב ב נערך לאחרונה על ידי
    #9

    תודה רבה התקדמנו לשגיאה הבאה..
    מקווה שאני לא משגע אותך

    
    (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.
    
    

    ליצירת קשר: admin@i-call.me

    הידד! גישה למייל גם בלי מחשב ואינטרנט!

    תגובה 1 תגובה אחרונה
    0
  • שואףש מנותק
    שואףש מנותק
    שואף
    כתב ב נערך לאחרונה על ידי שואף
    #10

    מה שמעניין, שמהמחשב זה סוףסוף עובד, אני יושב וצוחק לראות איך זה פותח את הכרום ומכניס הסיסמא שלי ומושך נתונים..
    אבל בלינוקס זה לא עובד

    תודה רבה על הכל

    ליצירת קשר: admin@i-call.me

    הידד! גישה למייל גם בלי מחשב ואינטרנט!

    yossizY WWWW 2 תגובות תגובה אחרונה
    0
  • yossizY מחובר
    yossizY מחובר
    yossiz
    השיב לשואף ב נערך לאחרונה על ידי
    #11

    @שואף

    sudo apt install libnss3
    

    📧 יוסי@מייל.קום | 🌎 בלוג | ☕ קפה

    תגובה 1 תגובה אחרונה
    1
  • WWWW מנותק
    WWWW מנותק
    WWW
    השיב לשואף ב נערך לאחרונה על ידי
    #12

    @שואף כמה זמן לוקח לו עד שמופיע הנתונים?

    WWW.netfree@gmail.com || קשבק! החזר כספי לבנק על רכישות באינטרנט || עונים על סקרים ומרוויחים כסף!

    תגובה 1 תגובה אחרונה
    1
  • שואףש מנותק
    שואףש מנותק
    שואף
    כתב ב נערך לאחרונה על ידי
    #13

    @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, לא הבנתי הכל שמה אבל אני מנסה לאט לאט

    ליצירת קשר: admin@i-call.me

    הידד! גישה למייל גם בלי מחשב ואינטרנט!

    yossizY תגובה 1 תגובה אחרונה
    0
  • yossizY מחובר
    yossizY מחובר
    yossiz
    השיב לשואף ב נערך לאחרונה על ידי
    #14

    @שואף כרום לא נותן להריץ אותו כרוט בלי פרמטר --no-sandbox.
    או תריץ כמשתמש רגיל, או תמצא דרך להגיד ל-pupeteer להוסיף את הפרמטר הנ"ל.

    📧 יוסי@מייל.קום | 🌎 בלוג | ☕ קפה

    תגובה 1 תגובה אחרונה
    2
  • שואףש מנותק
    שואףש מנותק
    שואף
    כתב ב נערך לאחרונה על ידי
    #15

    נכון
    אז עברתי ליוזר אחר, והגיעה שגיאה חדשה..

    
    (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
    
    
    
    

    ליצירת קשר: admin@i-call.me

    הידד! גישה למייל גם בלי מחשב ואינטרנט!

    yossizY תגובה 1 תגובה אחרונה
    0
  • yossizY מחובר
    yossizY מחובר
    yossiz
    השיב לשואף ב נערך לאחרונה על ידי
    #16

    @שואף תעשה

    showBrowser: false
    

    📧 יוסי@מייל.קום | 🌎 בלוג | ☕ קפה

    WWWW שואףש 2 תגובות תגובה אחרונה
    3
  • WWWW מנותק
    WWWW מנותק
    WWW
    השיב לyossiz ב נערך לאחרונה על ידי
    #17

    @yossiz כבר הצלחתי להתגבר על כל הבעיות, אבל אני מקבל:

    scraping failed for the following reason: generic
    
    

    😞
    בבנק הפועלים.

    WWW.netfree@gmail.com || קשבק! החזר כספי לבנק על רכישות באינטרנט || עונים על סקרים ומרוויחים כסף!

    dovidD תגובה 1 תגובה אחרונה
    0
  • dovidD מנותק
    dovidD מנותק
    dovid ניהול
    השיב לWWW ב נערך לאחרונה על ידי
    #18

    @WWW תראה את כל הקוד, כמובן תצנזר את השם והסיסמה.

    אפשר ליצור קשר dovid@tchumim.com

    WWWW 2 תגובות תגובה אחרונה
    1
  • WWWW מנותק
    WWWW מנותק
    WWW
    השיב לdovid ב נערך לאחרונה על ידי
    #19

    @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 לפנ"כ ואותה שגיאה.

    WWW.netfree@gmail.com || קשבק! החזר כספי לבנק על רכישות באינטרנט || עונים על סקרים ומרוויחים כסף!

    תגובה 1 תגובה אחרונה
    0
  • WWWW מנותק
    WWWW מנותק
    WWW
    השיב לdovid ב נערך לאחרונה על ידי
    #20

    @dovid ניסיתי גם עם שם משתמש שגוי, וקבלתי אותו שגיאה.

    WWW.netfree@gmail.com || קשבק! החזר כספי לבנק על רכישות באינטרנט || עונים על סקרים ומרוויחים כסף!

    dovidD תגובה 1 תגובה אחרונה
    0

  • 1
  • 2
  • התחברות

  • אין לך חשבון עדיין? הרשמה

  • התחברו או הירשמו כדי לחפש.
  • פוסט ראשון
    פוסט אחרון
0
  • דף הבית
  • קטגוריות
  • פוסטים אחרונים
  • משתמשים
  • חיפוש
  • חוקי הפורום
  • התחברות

  • אין לך חשבון עדיין? הרשמה

  • התחברו או הירשמו כדי לחפש.