sotolko / csgo-market-sniper

Bot that monitors desirable skins and will automatically buy them
GNU General Public License v3.0
96 stars 28 forks source link

429 Client Error: Too Many Requests for url #22

Open kitchmen opened 1 year ago

kitchmen commented 1 year ago

Hi I run the program and then I get hit with a stop due to

Traceback (most recent call last): File "C:\Users\kitch\Documents\GitHub\csgo-market-sniper\csgo-market-sniper.py", line 31, in check_whole_page(count, url_info) File "C:\Users\kitch\Documents\GitHub\csgo-market-sniper\functions.py", line 159, in check_whole_page item_name, item_float, item_pattern, whole_json = save_json_response(btn) File "C:\Users\kitch\Documents\GitHub\csgo-market-sniper\functions.py", line 202, in save_json_response response.raise_for_status() File "C:\Users\kitch\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://api.csgofloat.com/?url=steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M4313927967666358717A29862318717D2315455664352767148

Could this be to the new issues with Steam restricting floatdb to so many inspects?

DqRN commented 1 year ago

yes

TIllAd commented 1 year ago

same error. Is there a fix?

DqRN commented 1 year ago

negative, either we wait for the api to sort its shit out or someone/the dev figures out another way to read floats and pattern ids

jcardama commented 1 year ago

Until the CSGOFloat api is fixed, what I've done is modified the script to install the CSGOFloat market checker extension and use the data provided by it to query for the float and paint seed.

DqRN commented 1 year ago

Huh my idea actually works haha

jcardama commented 1 year ago

Huh my idea actually works haha

It does, the only caveat is that the only information you can gather is Float & Paint Seed, no way on getting number of stickers or other information. Also had to add a bit of a delay as sometimes the extension takes a couple of seconds to load the float information so it takes more time to go through all the skins.

DqRN commented 1 year ago

Huh my idea actually works haha

It does, the only caveat is that the only information you can gather is Float & Paint Seed, no way on getting number of stickers or other information. Also had to add a bit of a delay as sometimes the extension takes a couple of seconds to load the float information so it takes more time to go through all the skins.

Sick, I mean at least it works :] do you plan to share it?

jcardama commented 1 year ago

@jcardama do you plan to share it?

Indeed! Just making sure I didn't break anything in the process as I had to rewrite a bunch of the original script.

DqRN commented 1 year ago

@jcardama do you plan to share it?

Indeed! Just making sure I didn't break anything in the process as I had to rewrite a bunch of the original script.

How does that work does it update here or do you make your own project?

jcardama commented 1 year ago

@jcardama do you plan to share it?

Indeed! Just making sure I didn't break anything in the process as I had to rewrite a bunch of the original script.

How does that work does it update here or do you make your own project?

Planning on creating a fork of this repo as, as you require to have the CSGOFloat Market Checker extension locally, will provide all the details on how to get it.

kitchmen commented 1 year ago

@jcardama do you plan to share it?

Indeed! Just making sure I didn't break anything in the process as I had to rewrite a bunch of the original script.

How does that work does it update here or do you make your own project?

Planning on creating a fork of this repo as, as you require to have the CSGOFloat Market Checker extension locally, will provide all the details on how to get it.

Any idea on when you're gonna release it? I can help test if need be.

jcardama commented 1 year ago

I've forked this repo and updated the bot to be able to use the CSGOFloat extension to get skin floats & patterns so the bot can function properly. https://github.com/jcardama/csgo-market-sniper

DqRN commented 1 year ago

@jcardama idk what ive done haha

image

jcardama commented 1 year ago

@jcardama idk what ive done haha

image

Make sure the path is surrounded by single quotes like this: chrome_options.add_extension('C:\pah\to\extension.crx')

DqRN commented 1 year ago

oop image

DqRN commented 1 year ago

@jcardama it seems stops after its finished scanning all the desired skins

jcardama commented 1 year ago

oop image

Please update to latest version, I've commited a few changes to address some issues. Run the following command to get the latest changes: git pull

I'm currently testing with 14 skins and seems to be working fine.

DqRN commented 1 year ago

cleaner, but the same thing happened after scanning all the skins image

DqRN commented 1 year ago

hold up im dumb, its calling for the price in the config, but I still have (number_of_stickers:) so its pulling from the wrong line xD

Edit: I tested that theory and I was wrong its still doing it -__-

jcardama commented 1 year ago

hold up im dumb, its calling for the price in the config, but I still have (number_of_stickers:) so its pulling from the wrong line xD

No worries, my bad for not mentioning you had to remove that. Still please pull again, I've added a potential fix even if it is incorrect..

DqRN commented 1 year ago

working fine now thanks

DqRN commented 1 year ago

@jcardama here is a new one for you, works fine after restarting it though.

UoauA7NIJT

kitchmen commented 1 year ago

@jcardama here is a new one for you, works fine after restarting it though.

UoauA7NIJT

I added a VPN and its been working fine for about an hour.

jcardama commented 1 year ago

@jcardama here is a new one for you, works fine after restarting it though.

UoauA7NIJT

This issue is when trying to retrieve the sort button. I've made it so that it clicks it sorting floats from lower to highest, making it so that you don't have to go through all the pages to find the skins with the lower floats, making the bot more efficient. I've pushed a fix so if it doesn't find the button on time the bot can still continue.

@DqRN In the future please report any issues on the forked repo so we don't clutter this comment section.

Cheezy1234 commented 1 year ago

@jcardama i am getting this issue where the buy button cant be found, is that because the skin has already sold or is another issue? image

jcardama commented 1 year ago

@jcardama i am getting this issue where the buy button cant be found, is that because the skin has already sold or is another issue? image

I'd check that the skin is not already sold, or when you get the error, check the actual listings, see if you can spot if the buy button is present.

DqRN commented 1 year ago

@jcardama yo I just tested the bot with a cheap item, set the listed patterns and it didn't buy anything :<

Edit: tested multiple pages, you can see the pattern ids on the browser but no buy is being executed

jcardama commented 1 year ago

@jcardama yo I just tested the bot with a cheap item, set the listed patterns and it didn't buy anything :<

Edit: tested multiple pages, you can see the pattern ids on the browser but no buy is being executed

I've pushed an update that fixes the Pattern validation, could you verify?

I've enabled issues on the forked repo, please report any issues here: https://github.com/jcardama/csgo-market-sniper/issues

DqRN commented 1 year ago

@jcardama its working

mszansan commented 1 year ago

i have a problem while trying to install selenium-wire (i have every other from requirements.txt). Collecting zstandard>=0.14.1 (from selenium-wire) Using cached zstandard-0.21.0.tar.gz (659 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [30 lines of output] Traceback (most recent call last): File "C:\Users\PC\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\PC\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5fd0jznv\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5fd0jznv\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires self.run_setup() File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5fd0jznv\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5fd0jznv\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup exec(code, locals()) File "", line 90, in File "C:\Users\PC\AppData\Local\Temp\pip-install-x6h7lq5r\zstandard_b460ea1ac66c4af3a9ed041980c64260\setup_zstd.py", line 66, in get_c_extension compiler.initialize() File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5fd0jznv\overlay\Lib\site-packages\setuptools_distutils_msvccompiler.py", line 253, in initialize vc_env = _get_vc_env(plat_spec) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5fd0jznv\overlay\Lib\site-packages\setuptools\msvc.py", line 233, in msvc14_get_vc_env return _msvc14_get_vc_env(plat_spec) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5fd0jznv\overlay\Lib\site-packages\setuptools\msvc.py", line 190, in _msvc14_get_vc_env raise distutils.errors.DistutilsPlatformError("Unable to find vcvarsall.bat") distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.

could u help me?