Jump to content

Backpack.tf no longer works with Google Sheets IMPORTXML?


Daco

Recommended Posts

For the past few months I've been using Google Sheets data scraping to keep track of my backpack worth. To do this I use an IMPORTXML function and a script to refresh and save the data every 6 hours. Yesterday it stopped working and hasn't been working since, did backpack.tf change something so that this no longer works? Is there another way to save backpack value to google sheets?

 

This is the function I use for reference: 

=IMPORTXML("https://backpack.tf/profiles/76561198110698316","/html/body/main/div[1]/div[2]/div/div[2]/div[2]/ul/li[1]/strong/span")

Link to comment
Share on other sites

  • Administrators

Hi, it is likely this request is being blocked by a firewall. But, this was probably going to stop working anyway as this page is going to change soon.

 

If you are using a script, you can just use the user APIs. You can get an access token here:

https://next.backpack.tf/account/api-access

 

You will use the access token either in the querystring as ?token=xxxx, or in an X-Auth-Token header (header is preferable).

 

POST to this endpoint to trigger an inventory refresh:

https://api.backpack.tf/api/inventory/76561198110698316/refresh

 

When this returns, GET this endpoint for a JSON object corresponding to your inventory values:

https://api.backpack.tf/api/inventory/76561198110698316/values

 

Sorry you won't really be able to do it that way anymore, but I hope this helps.

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...