klept0 / MS-Rewards-Farmer

A simple bot that uses Selenium to farm M$ Rewards in Python
MIT License
216 stars 45 forks source link

Search reusing queries #192

Open qtie-code opened 2 weeks ago

qtie-code commented 2 weeks ago

Before submitting a bug report...

Branch

master

Commit

0a94091

Describe the bug

I run the script multiple times a day as a fail-safe and to ensure at least once it completes. It will reuse identical queries on the same day, but bing search does not count identical queries, this leads to repeated failed attempts. It would be good if the queries alternated more and not reused.

Copy and paste your error

2024-08-29 10:56:45,333 [INFO] [BING] Remaining searches=9 2024-08-29 10:56:50,972 [DEBUG] terms=['capri sun', 'capri sun sirup', 'capri sun eppelheim', 'capri sun eis', 'capri sun freezies', 'capri sun jobs', 'capri sun gewinnspiel', 'capri sun multivitamin', 'capri-sun orange', 'capri-sun fze', 'capri-sun orange 200ml', 'capri-sun freezies orange'] 2024-08-29 10:56:50,973 [DEBUG] rootTerm=capri-sun 2024-08-29 10:56:51,023 [DEBUG] term=capri sun 2024-08-29 10:57:09,446 [INFO] [BING] Remaining searches=8 2024-08-29 10:57:14,864 [DEBUG] terms=['moers messerattacke', 'moers', 'moers plz', 'moers milcherzeuger info', 'moersdorf', 'moers news', 'moerschen', 'moers wetter', 'moers frischeprodukte', 'moers festival', 'moers bundesland', 'moerschen tönisvorst'] 2024-08-29 10:57:14,864 [DEBUG] rootTerm=moers 2024-08-29 10:57:14,903 [DEBUG] term=moers messerattacke 2024-08-29 10:57:18,868 [DEBUG] [BING] Search attempt not counted 1/8, sleeping 14.0625 seconds... 2024-08-29 10:57:32,962 [DEBUG] term=moers 2024-08-29 10:57:36,302 [DEBUG] [BING] Search attempt not counted 2/8, sleeping 28.125 seconds... 2024-08-29 10:58:04,461 [DEBUG] term=moers plz 2024-08-29 10:58:08,174 [DEBUG] [BING] Search attempt not counted 3/8, sleeping 56.25 seconds... 2024-08-29 10:59:04,471 [DEBUG] term=moers milcherzeuger info 2024-08-29 10:59:07,572 [DEBUG] [BING] Search attempt not counted 4/8, sleeping 112.5 seconds... 2024-08-29 11:01:00,127 [DEBUG] term=moersdorf 2024-08-29 11:01:03,447 [DEBUG] [BING] Search attempt not counted 5/8, sleeping 225.0 seconds...

Screenshots

N/A

Value of dashboard variable

N/A

Mrocznv commented 2 weeks ago

Same situation in Polish searches

It would be good if the queries alternated more and not reused.

Im up to this ^

atzaveri commented 1 week ago

i've attempted to avoid all 8 tries editing searches.py, but it keeps trying 8 times with repeated queries, how to reduce or use root terms only?