Jump to content

Backpack Automatic Refresh Script (2023 edition)


Abstract

Recommended Posts

14 hours ago, gurkislv2 said:

idk what im doing rong help

It looks like you haven't installed colorama and requests, you can do so by typing this command in cmd/terminal:

pip install colorama requests

 

Link to comment
Share on other sites

  • 2 weeks later...

the script refreshes only once and trying to display the page gives the outdated inventory despite it succeeding,why?

Link to comment
Share on other sites

The script automatically stops if the backpack was successfully updated at most 3 minutes ago. If you want to refresh your inventory right away again, you need to wait 3 minutes.

5 minutes ago, eeeeeeeeeeeeeeeeeee said:

the script refreshes only once and trying to display the page gives the outdated inventory despite it succeeding,why?

 

Link to comment
Share on other sites

Just now, Abstract said:

The script automatically stops if the backpack was successfully updated at most 3 minutes ago. If you want to refresh your inventory right away again, you need to wait 3 minutes.

 

the api response area is broken and just shows a bunch of code and the page never refreshes

Link to comment
Share on other sites

5 minutes ago, eeeeeeeeeeeeeeeeeee said:

the api response area is broken and just shows a bunch of code and the page never refreshes

Can you take a screenshot?

Link to comment
Share on other sites

28 minutes ago, Abstract said:

Can you take a screenshot?

i left it running for a while,and the amount of times it tried coincided with the number of attempt (only once on the first attempt,then two times on second and so on though these had no effect despite being succesful) this is after reinstalls

Ekran Alıntısı.PNG

Link to comment
Share on other sites

I tested your ID64 and it refreshes as it should (the API response in your screenshot is normal too). You need to let the script run until it tells you that your backpack was refreshed at most 3 minutes ago. It can't force backpack.tf to update your backpack right away if that's what you're wondering.

1 hour ago, eeeeeeeeeeeeeeeeeee said:

i left it running for a while,and the amount of times it tried coincided with the number of attempt (only once on the first attempt,then two times on second and so on though these had no effect despite being succesful) this is after reinstalls

Ekran Alıntısı.PNG

 

---------------

 

Your mileage may vary, it can take anywhere from a few minutes to a few hours depending on your luck.

 

51 minutes ago, TacoTrogg said:

I haven't traded in many years and now am using your script, am I just screwed for how long this will take image.png.68b13ef58195107be9d1de0d9fe5d785.png

 

Link to comment
Share on other sites

12 minutes ago, Abstract said:

I tested your ID64 and it refreshes as it should (the API response in your screenshot is normal too). You need to let the script run until it tells you that your backpack was refreshed at most 3 minutes ago. It can't force backpack.tf to update your backpack right away if that's what you're wondering.

 

---------------

 

Your mileage may vary, it can take anywhere from a few minutes to a few hours depending on your luck.

 

 

why does it only try once and not a lot of times?

Link to comment
Share on other sites

29 minutes ago, eeeeeeeeeeeeeeeeeee said:

why does it only try once and not a lot of times?

There is no screenshot of any error message so I can't see what's going wrong. Make sure you didn't set p_loopuntilupdated to false, that's the only reason it would try once at all times. Privately message me on forums with a video of the whole process (running the script until it stops working) and I might be able to see what's wrong.

Link to comment
Share on other sites

 

I have installed Python and the colorama and requests prerequisites through pip as instructed. I cannot find any comment in the refreshbp.py script referring to backpack.tf or token in any way which is what the current installation instructions reference.

 

Attempting to run bprefresh.py results in the following error and the process immediately terminates if not run from the command line:

 

Quote

C:\refreshbp>refreshbp.py

  File "C:\refreshbp\refreshbp.py", line 3
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax

C:\refreshbp>

 

Please advise.

cmd_geQCEXroWD.png

cmd_nPKhiP8AXM.png

 

 

Edit: I realize Opera jacked something up when trying to "Right Click->Save linked content as..." on the Git page.

Downloading the script through the Git interface manually seems to produce a more correct output. Strikethrough since it appears to be working now.

Link to comment
Share on other sites

honestly have no idea what im doing here, followed all the steps in readme and whenever i try to execute it, it instantly closes or says invalid syntax 

Link to comment
Share on other sites

  • 3 weeks later...

so i assume i have to run multiple instances for multiple IDs?

 

or can i have one instance check them all one after the other?

Link to comment
Share on other sites

2 hours ago, TCLG6x6 said:

so i assume i have to run multiple instances for multiple IDs?

 

or can i have one instance check them all one after the other?

You have to run multiple instances if you want to refresh multiple IDs at the same time.

Link to comment
Share on other sites

  • 3 months later...

A new update has been made to the script which should address some issues when the script reaches ~1000 attempts and when the API doesn't update the "Next update time" for extended periods of time.

https://gitlab.com/carbonwind/backpack-automatic-refresher-redux/-/commit/39461cf194179554b8f5a06d59a0fa68414131b2

https://gitlab.com/carbonwind/backpack-automatic-refresher-redux (download)

 

Link to comment
Share on other sites

Hey so quick question, since I'm at this for the past two days. I've been running the program both yesterday and today, and probably had around like 500 requests sent so far. And stil my backpack says that the last good inventory for me is from 2 months ago

 

Am I doing something wrong, or is there something else I can do? I've been hoping to set up some listings, but with how my backpack looks currently it just doesn't let me

image.png

Link to comment
Share on other sites

You aren't doing anything wrong and all you can do is keep running the script.

 

The problem is Valve's rate limiting which seems to be getting worse.

  • Thanks 1
Link to comment
Share on other sites

Seems like we're getting error 429 (Too many requests) again:

image.png.6f6d8544e33c87627eb68abd0648de81.png

 

Not sure why it keeps spamming requests though, this time I don't see an error of not getting the server time or something.

Link to comment
Share on other sites

2 hours ago, shadyfan said:

Seems like we're getting error 429 (Too many requests) again:

Not sure why it keeps spamming requests though, this time I don't see an error of not getting the server time or something.

 

I've found the issue, oversight on my part. The script should've used the global variable to indicate that the backpack was refreshed and stop but it used a local one (in the function) instead causing it to send requests without any delay in an infinite loop. This should fix the "Too many requests" issue for good this time.

https://gitlab.com/carbonwind/backpack-automatic-refresher-redux/-/commit/15394ccf61374fcdec247c63c8ab0dc169e7f1e2

https://gitlab.com/carbonwind/backpack-automatic-refresher-redux (download)

Link to comment
Share on other sites

  • 4 weeks later...

Great time to test the script again, I guess (while site is having issues) 😀

 

New error:

aLtIqj0.png

 

Guess something on the following line breaks:

if result.text is not None:

Link to comment
Share on other sites

On 8/12/2023 at 10:34 PM, shadyfan said:

Great time to test the script again, I guess (while site is having issues) 😀

 

I did not get the error on my end but I was able to force it manually. This shouldn't happen at all but I've added another condition to check if result.text doesn't exist at all like above.

https://gitlab.com/carbonwind/backpack-automatic-refresher-redux/-/commit/1811135abd2e76ae94d2831b10187c7ac3dfcbb6

https://gitlab.com/carbonwind/backpack-automatic-refresher-redux (download)

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hi, I have a question: What is the ‘backpack refresh button’ mentioned in the original post? Is this something that was removed? I can’t see a backpack refresh button anywhere. Or was it just referring to loading your backpack by viewing it on the site?

 

Also, I downloaded and ran the script for the first time. Should I just leave it running in the background? How long does it typically take before your profile updates according to your backpack? I don’t understand why your profile is so slow to update. My backpack is updated when I view it on the site, but my profile is out-of-date and has been for days. This prevents me from creating buy orders, which is frustrating. I’m assuming this is the issue that this script tries to fix, but I’m not sure how long it will take.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...