Fix: aceptar referencias HomeServe 16xxxxxx (antes solo 15xxxxxx)
This commit is contained in:
4
robot.js
4
robot.js
@@ -400,8 +400,8 @@ async function runHomeserve(ownerId, user, pass, gremiosDB) {
|
|||||||
const firstTd = tr.querySelector('td');
|
const firstTd = tr.querySelector('td');
|
||||||
if (!firstTd) return;
|
if (!firstTd) return;
|
||||||
|
|
||||||
const textMatch = firstTd.innerText.trim().match(/^15\d{6}$/);
|
const textMatch = firstTd.innerText.trim().match(/^1\d{7}$/);
|
||||||
const aMatch = firstTd.querySelector('a') ? firstTd.querySelector('a').innerText.trim().match(/^15\d{6}$/) : null;
|
const aMatch = firstTd.querySelector('a') ? firstTd.querySelector('a').innerText.trim().match(/^1\d{7}$/) : null;
|
||||||
const ref = textMatch ? textMatch[0] : (aMatch ? aMatch[0] : null);
|
const ref = textMatch ? textMatch[0] : (aMatch ? aMatch[0] : null);
|
||||||
|
|
||||||
if (ref) {
|
if (ref) {
|
||||||
|
|||||||
Reference in New Issue
Block a user