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

Error when Log In #7

Open
yhngr opened this issue May 12, 2023 · 22 comments
Open

Error when Log In #7

yhngr opened this issue May 12, 2023 · 22 comments

Comments

@yhngr
Copy link

yhngr commented May 12, 2023

Hello,

I don't know if I'm doing something wrong ( probably )

If you can help me thanks a lot !

image_2023-05-12_154217435

@BenSouchet
Copy link
Owner

Hi,
The steps to properly pass the current Cloudflare restrictions can seems weird.

The steps are:

  • open your favorite web browser normally, go to https://www.cardmarket.com/en
  • Wait until you pass the Cloudflare protection and landed on the website
  • Now you can, from your terminal, start cw-wizard with:
    python3 cw-wizard-gui.py
  • The interface will ask for the name of your web browser, the one you used to open the Cardmarket website url in the previous step (should be chrome If you used Google Chrome, firefox if you used Mozilla Firefox,…)

If you still got the same 403 message, retry the described steps but first ensure all Cardmarket tabs are closed from your web browser (really important).

Normally in 1/2 try this will work.

When it’s working you can use cw-wizard-gui.py for 30mins/1hour without redoing the steps of opening the Cardmarket website on your web browser.

Let me know if after testing these steps you are still blocked, by the way which web browser are you using? (I only tested with Chrome and Firefox but this should work with all browsers)

@yhngr
Copy link
Author

yhngr commented May 12, 2023

Hello ! Thanks for the answer !

i've try on Opera first and Chrome in second but still don't work for me
image_2023-05-12_182711710

I'm waiting for the cloudflare finish...etc but still have the 403 error

I've desactivate 2FA..etc

@BenSouchet
Copy link
Owner

@yhngr I can reproduce the issue, currently investigating 🕵️

@yhngr
Copy link
Author

yhngr commented May 12, 2023

Thanks a lot ! You are amazing ! Hope you will find something

it's too boring to have to go through the site's wizard system directly, or manually select the best vendor..etc x)

@BenSouchet
Copy link
Owner

I just published a new version fixing the issue.

It's now require to pass the User-Agent in addition to the browser name (this is due to the increased protection set by Cloudflare).

I updated the README page, but in summary you need to open another tab in your browser and search for "my user agent", copy and pasting the value when requested by cw-wizard-gui.py.

User-Agent is a long string starting like: Mozilla/5.0 ...
After checking keep me informed if this is working on your side.

PS: I think is no more require to be logged-off before executing the script.

@yhngr
Copy link
Author

yhngr commented May 12, 2023

yeah work with chromee but not with Opera apparently !

image_2023-05-12_234949362

doesn't respond but I guess it's normal ! take a few minutes probably !

Thanks a lot !

@yhngr
Copy link
Author

yhngr commented May 12, 2023

just got this error
image_2023-05-12_235942087

the result
image_2023-05-13_000001172

Don't understand if he finish or not to find the best

result on CM :
image_2023-05-13_000115430

@BenSouchet
Copy link
Owner

yeah work with chromee but not with Opera apparently !

image_2023-05-12_234949362

doesn't respond but I guess it's normal ! take a few minutes probably !

Thanks a lot !

Thanks for the responses, for this screen it's seems like a code issue, will investigate to fix that tomorrow (I think the code try to load more offers but there is no more offers to load for this card).

@BenSouchet
Copy link
Owner

BenSouchet commented May 12, 2023

just got this error image_2023-05-12_235942087

the result image_2023-05-13_000001172

Don't understand if he finish or not to find the best

result on CM : image_2023-05-13_000115430

If you got this message this means that the script made more than 5000 requests, this can happen start the script with lots of wantlists.

You will need to wait for 12h/24h to be able to reuse Cardmarket because you reach the maximum number of requests allowed per day.

No big deal, be reassured, but be aware that this is something that can happen.

@BenSouchet
Copy link
Owner

BenSouchet commented May 12, 2023

And last for the diff in the result, this is related to the limit of request that has been reached. The script don't crash but stop looking for cards so this is why you only have a partial result with the best candidate having only 9 cards you looking for.

When you will have access again to Cardmarket check and tell me what are the values you entered in you wantlist for the Buy Price.

So I can understand if it's a bug from the code or if it's normal but the values are too high and so load lots of offers (so perform more requests).

Edit / Hypothesis

Another possibility is that one (or more) card(s) in your wantlist is at a very low price (0.01€) and there this thousands of offers for this card at this very low price, you set a Buy Price of let says 1€ but this lead to 5000 offers available that are cheaper than the limit of 1€.
Since Cardmarket display 50 offers at a time, the will script require 100 requests to get the 5000 compatible offers.

Currently the script isn't limited in the number of offers to retrieve per card, if you didn't set a Buy Price the script only record the 50 lower offers meeting your criteria but if you set a Buy Price it look for all the available offers below this price, this can lead to lots of requests.

I should maybe set a limit of offers retrieved by card, to limit the number of requests and avoid getting quickly the too many requests error

@yhngr
Copy link
Author

yhngr commented May 15, 2023

Okay I see thanks !

now i set a maximum price..etc

And got that

Apparently an language for the cards error
image_2023-05-15_120500696

And the script "crash" doesn't respond

@BenSouchet
Copy link
Owner

@yhngr Thanks, I just released a new version that should fix the issues you mentioned.

@BenSouchet
Copy link
Owner

And just want to thank you 😊 for the time you spend to check and report the issues so I can improve the script.

@yhngr
Copy link
Author

yhngr commented May 15, 2023

Thanks to you for ur work ! It's a pleasure aha ! If I can get better prices for the cards with your script, i'm not gonna say no ! And the better it work the better price I will get ! :') !

@yhngr
Copy link
Author

yhngr commented May 15, 2023

image_2023-05-15_135311770

Not responding and this attributeError don't really know ?

This is the want list with price..etc
image_2023-05-15_135345574

@BenSouchet
Copy link
Owner

Will look into that, thanks for sharing the screen of the wantlist so I will be able to properly check the exact wantlist you have the issue with :)

@BenSouchet
Copy link
Owner

BenSouchet commented May 15, 2023

@yhngr Just published a new version.
I'm please to tell you that there is indeed better result with CW-Wizard than just using the Cardmarket one.

  • Result of the best deals for minimum shipping of Cardmarket:
Screenshot 2023-05-15 at 14 36 35
  • Result of CW-Wizard:
Screenshot 2023-05-15 at 14 36 05

I haven't checked in full details the difference, I let you tell me after testing it.

Edit

It seems there is a small bug in the list display when looking for the seller details:
Screenshot 2023-05-15 at 15 15 17
The condition is override by the expansion and the language by the condition, it's purely visual, the card has been properly found with the correct asked parameters.
Screenshot 2023-05-15 at 15 19 29

@yhngr
Copy link
Author

yhngr commented May 15, 2023

Perfect I'm gonna test this ! thanks for your time !

@yhngr
Copy link
Author

yhngr commented May 15, 2023

Btw can you show me a screen of the wishlist u made ? to see the price you put..etc ? I'm reaching limit at the end of the search

Thanks in advance

@BenSouchet
Copy link
Owner

BenSouchet commented May 15, 2023

Btw can you show me a screen of the wishlist u made ? to see the price you put..etc ? I'm reaching limit at the end of the search

Thanks in advance

I made the exact same wantlist as yours (same quantities, max price, languages, expansions):
Screenshot 2023-05-15 at 15 51 34

Sometime the message for the limit reached is sent by Cardmarket, but for whatever reason, you can go to the cardmarket website (with your browser) and after that you can restart the script and this work.

For info: I checked and the script for the wantlist your shared do only 25 requests, so I think that the Too Many Requests error is not due to the number of requests (5000 per day per user) but maybe due to the time in seconds between requests.
I currently added 170ms of delay between requests (this is maybe not enough since we still get sometime the Too Many Requests Error)

@yhngr
Copy link
Author

yhngr commented May 15, 2023

Okay why not aha ! Thanks perfect !

@BenSouchet
Copy link
Owner

Last info, currently the quantity value specified in wantlists isn't used by the script, dealing with that is a little bit tricky, I will maybe add the support for that in the future.

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

No branches or pull requests

2 participants