שימושי לתכנות שמזוהות כוירוסים, וצריך להגיד ללקוח שיכניס את זה לחריגים
במקום זה היה טוב לשדר את זה ישירות לחריגים, ושהלקוח רק יאשר את הפעולה
אבל אני גם חושב שזה לא שייך
שימושי לתכנות שמזוהות כוירוסים, וצריך להגיד ללקוח שיכניס את זה לחריגים
במקום זה היה טוב לשדר את זה ישירות לחריגים, ושהלקוח רק יאשר את הפעולה
אבל אני גם חושב שזה לא שייך
תודה
ולהכניס תכנה לרשימת החריגים, מכירים אפשרות?
@clickone תודה אבל זה לא עובד
הייתי מעוניין לשלוח פקודה לAVAST לעצירה זמנית של ההגנה, כמו כשלוחצים על הסמל ובוחרים "השבת הגנה".
כמובן שהמשתמש יצטרך לאשר את זה ידנית (למרות שהיה עוד יותר טוב אם אפשר לדלג על זה )
מכירים כזה דבר?
לא מצאתי ברשת
לא מבין
התקנת על שרת VPS, נכון?
מה הבעייה למחוק אותו להתקין על חדש, נקי?
בDOC הרשמי ממליצים להתקין על מכונה נקיה, זה יחסוך לך בלאגן
אם ההתקנה נתקעה באמצע, תפרמט ותתקין שוב
תחליף את החלק האחרון לזה
scraper.scrape(credentials).then(function(scrapeResult ) {
if (scrapeResult.success) {
console.log(JSON.stringify(scrapeResult.accounts, null, 4));
}
else {
console.error(`scraping failed for the following reason: ${scrapeResult.errorType}`);
}
});
אבל אין שם יתרה עדכנית.
@yossiz תודה זה עכשיו עובד. מעניין שבשרת זה לוקח יותר זמן מבמחשב.
@WWW עכשיו השמים הם הגבול... רק צריך להבין קצת יותר איך הכל עובד, אבל בעיקרון אפשר לעשות כל מה שעושים דרך האתר.
אני מבין שהפוקנציה מחזירה אובייקט שיש בו את כל הפעולות, והדוגמא שיש בגיטהב היא סה"כ סופרת את הפעולות ומציגה את המספר. עכשיו צריך לנתח את האובייקט הזה ולשלוף תוצאות. אני מאמין שהיתרה העדכנית זה התוצאה של הפעולה האחרונה.
נכון
אז עברתי ליוזר אחר, והגיעה שגיאה חדשה..
(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
@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: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.
אוקיי הבנתי את כוונתך, הייתי צריך למחוק את ה<>
אז מחקתי ועכשיו יש שגיאה
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)
ברור מה השאלה
החלפתי לכוכביות כי אין לי מספיק כסף בחשבון לחלק לכולם..
תודה
עכשיו השגיאה היא
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)
בהמשך להודעה של @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...
@Avi_av אמר בהתממשקות עם הבנק??:
https://github.com/eshaham/israeli-bank-scrapers - פרויקט קוד פתוח לכריית המידע. נשמע שכבר עשה את העבודה בגדול..
ואו זה מדהים, הכל מוכן שמה!
תודה רבה
מה זה ברסקה?
ויד עזרא נותנים?
תודה