Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(store): add bestbuy.ca #229

Merged
merged 5 commits into from Sep 23, 2020
Merged

feat(store): add bestbuy.ca #229

merged 5 commits into from Sep 23, 2020

Conversation

serg06
Copy link
Contributor

@serg06 serg06 commented Sep 23, 2020

Description

Adds bestbuy.ca to supported stores.

Note: {waitUntil: 'networkidle0'} was originally causing all requests to bestbuy.ca to time out, even with a 3 minute timeout. To fix this, I changed the Store model to allow specifying a different waitUntil parameter for that store's links.

Discord: sergo#8847

Testing

  1. I tested running it with an "Out of Stock" 3080 URL, it was correctly classified as "out of stock".
  2. I tested running it a "Coming Soon" 3090 URL, it was correctly classified as "out of stock".
  3. I tested running it with an in-stock 2060 URL, it was correctly classified as "in stock".

Instructions: Replace the one and only URL in bestbuy-ca.ts with the test URLs, then run.

Configuration: Default except STORES="bestbuy-ca".

@serg06 serg06 requested a review from jef as a code owner September 23, 2020 02:29
Copy link
Owner

@jef jef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I'm surprised we don't have domcontentloaded on the rest of these to be honest. I think we'll need to go in and do some refactoring, because we have the container classes for most of the html pages now.

import {Store} from './store';

export const BestBuyCa: Store = {
customWaitFor: 'domcontentloaded',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@jef jef merged commit 22fd22f into jef:main Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants