diff --git a/README.md b/README.md index 660b270..d5624f4 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ # api-xsmb-today -> take info from api by https://api-xsmb.cleverapps.io/v1 +> take info from api by https://api-xsmb-today.cyclic.app/api/v1 > -> web-scraped from https://xosoketqua.com/xsmb-xo-so-mien-bac.html +> web-scraped from https://az24.vn/xsmb-sxmb-xo-so-mien-bac.html --- | Keys | Type | | ---- | ------ | | time | String | -| G.ĐB | String | -| G.1 | String | -| G.2 | String | -| G.3 | String | -| G.4 | String | -| G.5 | String | -| G.6 | String | -| G.7 | String | +| ĐB | String | +| G1 | String | +| G2 | String | +| G3 | String | +| G4 | String | +| G5 | String | +| G6 | String | +| G7 | String | diff --git a/controllers/mainController.js b/controllers/mainController.js index e498b6e..bce9dd9 100644 --- a/controllers/mainController.js +++ b/controllers/mainController.js @@ -31,7 +31,6 @@ class MainController { .find('tr > td:first-child') .each(function (i) { const name = $(this).text(); - console.log(name); if (!name.includes('Mã ĐB')) { // for (let i = 0; i < names.length; i++) { @@ -119,11 +118,11 @@ class MainController { // console.log(nowDay.getHours() + ':' + nowDay.getMinutes()); // console.log(results); - const date = $('.class-title-list-link', html) + const date = $('div.tit-mien.clearfix.txt-center > div', html) .first() .find('a:last-child') .text() - .split(' ')[1]; + .split(' ')[2]; res.status(200).json({ countNumbers: numbers.length, diff --git a/routes/index.js b/routes/index.js index 91a89ed..f0d1e39 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,7 +1,7 @@ const routeV1 = require('./v1/index'); const routes = app => { - app.use('/v1', routeV1); + app.use('/api/v1', routeV1); }; module.exports = routes;