Fix series 1 tales lookup
This commit is contained in:
parent
67385220ab
commit
d9a98d5fbb
3
index.js
3
index.js
@ -322,6 +322,9 @@ async function sendPage(website, tries = 0) {
|
|||||||
if (scpMatch) {
|
if (scpMatch) {
|
||||||
let scp = scpMatch[1];
|
let scp = scpMatch[1];
|
||||||
let series = Number(scp[0]) + 1;
|
let series = Number(scp[0]) + 1;
|
||||||
|
if (Number(scp) < 1000) {
|
||||||
|
series = 1;
|
||||||
|
}
|
||||||
await page.goto(`http://www.scp-wiki.net/scp-series-${series}-tales-edition`);
|
await page.goto(`http://www.scp-wiki.net/scp-series-${series}-tales-edition`);
|
||||||
let tales = await page.$$(`a[href="/scp-${scp}"]+ul a`);
|
let tales = await page.$$(`a[href="/scp-${scp}"]+ul a`);
|
||||||
if (tales.length) {
|
if (tales.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user