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(galaxus): update selector, add out of stock check #1607

Merged
merged 18 commits into from Jan 11, 2021

Conversation

wofnull
Copy link
Contributor

@wofnull wofnull commented Jan 6, 2021

Description

Galaxus changed again the selector in the CSS, this time to Z1fp.

Last change done in: #1599 (yesterday)

Testing

verified change, price is now tracked again and not just in stock / out of stock.

@wofnull wofnull requested a review from jef as a code owner January 6, 2021 10:15
@wofnull wofnull changed the title fix(galaxus):Update Selector ( change 06.01.2021 ) fix(galaxus): update selector ( change 06.01.2021 ) Jan 6, 2021
@@ -8,7 +8,7 @@ export const Galaxus: Store = {
text: ['In den Warenkorb']
},
maxPrice: {
container: '.productDetail .Z1ex',
container: '.productDetail .Z1f2',
Copy link
Owner

Choose a reason for hiding this comment

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

Alright, so after this being dynamic, I think we need another way to solve this as the updated selector no longer works either.

image

Let's see if we can come up with something else.

It seems that using just .productDetail works here. Do you want to test and update?

Thanks!

Copy link
Contributor Author

@wofnull wofnull Jan 7, 2021

Choose a reason for hiding this comment

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

Using only ".productDetail" works most parts, since i have some special trackings on the galaxus site aswell, i found that as soon that a number comes before the acutal price, the script takes that number (even if it s an percentage)

Example: https://www.galaxus.de/de/s1/product/lian-li-o11dynamic-xl-midi-tower-pc-gehaeuse-12200197
image
image
image
image

So it looks like it works until there is running something like a discount or something like this ( in this case )

If this does not matter at all ( since main purpose is to find stock of items / prices of items overpriced ) i can do push the change to the fix branch if needed.

Copy link
Owner

Choose a reason for hiding this comment

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

i found that as soon that a number comes before the acutal price, the script takes that number (even if it s an percentage)

Well that sucks 😞

Also, updated selector again:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already updated like 10 minutes ago in bugfix branch, should be up to date now ( until the next change i think on sunday / monday ) ...

@wofnull wofnull changed the title fix(galaxus): update selector ( change 06.01.2021 ) fix(galaxus): update selector ( change 08.01.2021 ) Jan 8, 2021
…xus products currently, caused from inStock check not working properly ( cart is sometimes marked as enabled but its not enabled ). out of stock check works around this issue for now.
@wofnull wofnull changed the title fix(galaxus): update selector ( change 08.01.2021 ) fix(galaxus): update selector / out of stock check Jan 11, 2021
@wofnull
Copy link
Contributor Author

wofnull commented Jan 11, 2021

Out of the current not up to date selector another proble came up: all Items currently tracked were shown instock although the items were not instock,
Currently the script checks for InStock via an selector if the cart is active or not, regardless of the response of this check, it seems the cart can be marked as active and be inactive ( or the check itself is not working as it should ), as workaround i have added the 2 known states for out of stock on galaxus website as out of stock check.

Tested them and they work as expected , cross check with an real available item shows, instock is shown correctly at this stage.

However, the patch from 06.01 ( which was not merged yet ) aswell as the updated patch from 08.01. ( which is aswell not merged yet ) is included. I suspect an additional change for the update marker today, but there is still no change visible yet.

Please merge this asap, i will open another pull request if the state of the galaxus update marker changes again.

-> Verified and tested.
Awaited to work until wednesday.
@wofnull
Copy link
Contributor Author

wofnull commented Jan 11, 2021

As suspected, the update selector changed again a few hours ago, fixed this with the latest patch ( together with the implementation of the out of stock check for galaxus )

@jef
Copy link
Owner

jef commented Jan 11, 2021

I guess we can continue to do this. Thanks for building out the outOfStock selectors.

@jef jef changed the title fix(galaxus): update selector / out of stock check feat(galaxus): update selector, add out of stock check Jan 11, 2021
@jef jef merged commit c9cda1e into jef:main Jan 11, 2021
@jef
Copy link
Owner

jef commented Jan 11, 2021

Thanks for all your help!

@wofnull wofnull deleted the Galaxus_06.01.2021_Patch branch January 11, 2021 17:18
tylermilner added a commit to tylermilner/streetmerchant that referenced this pull request Jan 15, 2021
…-microcenter-out-of-stock

* 'main' of github.com:jef/streetmerchant: (23 commits)
  chore(deps-dev): bump webpack from 5.13.0 to 5.14.0 (jef#1692)
  chore(deps): bump puppeteer-extra from 3.1.15 to 3.1.16 (jef#1678)
  chore(deps): bump puppeteer-extra-plugin-block-resources from 2.2.7 to 2.2.8 (jef#1691)
  chore(deps): bump google-github-actions/release-please-action from v2.14 to v2.15 (jef#1655)
  chore(deps): bump @slack/web-api from 5.15.0 to 6.0.0 (jef#1669)
  fix(bandh): asus cards / out of stock check added (jef#1670)
  chore(deps): bump puppeteer-extra-plugin-stealth from 2.6.5 to 2.6.6 (jef#1680)
  chore(deps): bump twilio from 3.54.2 to 3.55.0 (jef#1679)
  chore(deps): bump puppeteer-extra-plugin-adblocker from 2.11.9 to 2.11.10 (jef#1681)
  chore(computeruniverse): add 3060ti cards (jef#1665)
  fix(wipoid): added 3090/3080/3070/3060ti/ryzen store items (jef#1683)
  feat(vsgamers): add maxPrice selector(jef#1682)
  fix(galaxus): update selector  ( 14.01.2020 07:00 ) (jef#1664)
  docs: add hyperlinks
  docs(twitch): add instructions on how to get tokens
  chore(lint): add void for dangling promise
  chore(deps): bump dependencies
  feat(twilio): add support to have multiple numbers (jef#1450)
  feat(galaxus): update selector, add out of stock check (jef#1607)
  feat(asus): add outOfStock label (jef#1653)
  ...
erwinc1 pushed a commit to erwinc1/streetmerchant that referenced this pull request Mar 31, 2021
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