hobbyist programmer on a stack no cap
'
1JMTVxReTE9nyXorzPPReLpWXXrRkSybaZ
offish 2020
Get item prices and volumes from the Steam Community Market using Python 3
License: MIT License
Traceback (most recent call last):
File "C:/Users/RealH/Desktop/Python Projects/Bitksins Search/test.py", line 125, in <module>
lowest_price = market.get_lowest_price(name, 730)
File "C:\Users\RealH\AppData\Local\Programs\Python\Python38\lib\site-packages\steam_community_market\market.py", line 186, in get_lowest_price
item = self.get_overview(name, app_id)
File "C:\Users\RealH\AppData\Local\Programs\Python\Python38\lib\site-packages\steam_community_market\market.py", line 73, in get_overview
if response["success"] == True:
TypeError: 'NoneType' object is not subscriptable
after a while, steam will block you from making more requests and this can cause issues.
i looked at your code and saw:
if response["success"] == True:
return response
return None
please change
if response["success"] == True
to
if response.get("success", None) == True
is Response is None you can't use a key on it. So instead you do .get("success", None) which defaults to None instead of throwing an Error.
This is a 2 second fix and prevents users from having to use a try/except
You could add new features, such as the quantity of items in the market and the lowest request to buy an item in the market, if possible.
when i tried to run the sample code as it is, also i tried to print it, but it always returns none, i might be doing something wrong, but i haven't just figured it out what wrong.
I'm very new to python and it's been very few days since I started coding in python.
I'm actively investing and interested in tracking the price on a day-to-day basis. I tried google sheets with importXML features but it didn't work well. I stumbled across this library and started using this.
Everything works well, only when I try the following line of code, it fails. It's even working with knives having * in the name.
market = Prices('INR')
print(market.get_price("Boston 2018 Returning Challengers (Holo/Foil)",730))
Let me know if I'm doing anything wrong or if I have to do something to get this work.
I've tried using \
to see if escape characters help, but it failed.
Any help here will be a great learning opportunity for me. Thanks.
I ran
from steam_community_market import Market, AppID
market = Market("USD")
item = "AK-47 | Redline (Field Tested)"
market.get_lowest_price(item, AppID.CSGO)
market.get_volume(item, 730)
This threw:
Traceback (most recent call last):
File "C:/Users/RealH/Desktop/Python Projects/HaveGenerator, SteamFunctions/test.py", line 7, in <module>
market.get_lowest_price(item, AppID.CSGO)
File "C:\Users\RealH\AppData\Local\Programs\Python\Python37\lib\site-packages\steam_community_market\market.py", line 178, in get_lowest_price
if "lowest_price" in item:
TypeError: argument of type 'NoneType' is not iterable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.