yopmail-helper
Version:
yopmail helper. It will help you receive the mail content.
22 lines (17 loc) • 518 B
JavaScript
const axios = require('axios');
const {parse} = require('node-html-parser');
async function getYp() {
const response = await axios({
method: 'get',
url: 'https://yopmail.com',
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 data = parse(response.data);
const result = data.querySelector('#yp')?.getAttribute('value');
return result + '';
}
module.exports = {
getYp,
};