Skip to content

Commit

Permalink
fix: plug
Browse files Browse the repository at this point in the history
  • Loading branch information
artemskii-dev committed Jun 21, 2022
1 parent 36e9abc commit 1c17c3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Ebay research",
"version": "0.0.17",
"version": "0.0.18",
"manifest_version": 2,
"author": "rollun.com",

Expand Down
7 changes: 4 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ function Control() {

while (isValidOffset() && isValidListingToParse(result.at(-1))) {
const nextPageButton = document.querySelector('button.pagination__next');
const isNextPageButtonDisabled = nextPageButton.getAttribute('aria-disabled') === 'true';

if (!nextPageButton) {
result.push(...await parseItemsList(statId));
console.log(result);
if (!nextPageButton || isNextPageButtonDisabled) {
break;
}

result.push(...await parseItemsList(statId));
console.log(result);
nextPageButton.click();
await wait(4000);
}
Expand Down

0 comments on commit 1c17c3b

Please sign in to comment.