UNPKG

yopmail-helper

Version:

yopmail helper. It will help you receive the mail content.

22 lines (18 loc) 561 B
const {getVersion} = require('./version'); const axios = require('axios'); async function getYj() { const version = await getVersion(); const url = `https://yopmail.com/ver/${version}/webmail.js`; const response = await axios({ method: 'get', url: url, headers: { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', }, }); const match = response.data.match(/&yj=([^&]+)&v=/); return match ? match[1] : null; } module.exports = { getYj, };