コミット
50a200cde6
|
@ -154,22 +154,30 @@ class Child extends ComChild<Account> {
|
||||||
req.request().method().toUpperCase() === 'GET',
|
req.request().method().toUpperCase() === 'GET',
|
||||||
);
|
);
|
||||||
function removeRepeats(num: number): number {
|
function removeRepeats(num: number): number {
|
||||||
|
|
||||||
const str = num.toString();
|
const str = num.toString();
|
||||||
|
const len = str.length;
|
||||||
|
|
||||||
if (str.length <= 2) {
|
|
||||||
|
if (len % 2 !== 0 || len === 1) {
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
const repeatPattern = /^(\d+?)\1+$/;
|
const mid = len / 2;
|
||||||
const match = str.match(repeatPattern);
|
const part1 = str.slice(0, mid);
|
||||||
|
const part2 = str.slice(mid);
|
||||||
|
|
||||||
if (match) {
|
|
||||||
return parseInt(match[1], 10);
|
if (part1 === part2) {
|
||||||
|
return parseInt(part1, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const token = req.url().split('token=')[1].split('&')[0];
|
const token = req.url().split('token=')[1].split('&')[0];
|
||||||
this.logger.info(`get login status token: ${token}`);
|
this.logger.info(`get login status token: ${token}`);
|
||||||
const element = await page.$('span.text-cornblue-700');
|
const element = await page.$('span.text-cornblue-700');
|
||||||
|
|
読み込み中…
新しいイシューから参照