Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import VK from 'vk-io';
import moment from 'moment';
import chrono from 'chrono-node';
import credentials from '../configs';
import { saveEventItemToDB, convertMonths, formatDate, sliceText, checkText } from './helpers';
const { app, key, token } = credentials.vk;
const vk = new VK({
app: app,
key: key,
token: token,
});
const init = (group) => {
vk.api.wall.get({
domain: group,
// query: `${moment().locale('ru').format('MMMM')}`,
// query: `*`,
count: 100,
filter: 'all'
})
.then(wall => {
// console.log('Wall:', wall);
import tress from 'tress';
// vk.setOptions({
// app: 111,
// login: 'protagonist@valtec.com',
// pass: 'luckyVaultBoy',
// phone: '+749531116869'
// });
const vk = new VK({
app: 6131483,
key: 'f4vLOjoPyKSOw4qXgb6y',
scope: 'all',
token: 'b58844e3b58844e3b58844e34eb5d5cbf8bb588b58844e3ecf6456263d1070e24bb2a38',
});
const URL = 'https://imaguru.by/events/';
var results = [];
// `tress` последовательно вызывает наш обработчик для каждой ссылки в очереди
var q = tress(function(url, callback){