Git Product home page Git Product logo

steam_community_market's Introduction

offish

hobbyist programmer on a stack no cap

'

'
1JMTVxReTE9nyXorzPPReLpWXXrRkSybaZ


offish 2020

steam_community_market's People

Contributors

gobot1234 avatar offish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

steam_community_market's Issues

TypeError: 'NoneType' object is not subscriptable

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

Request to add new features

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.

it returns "none"

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.

Items having / in the name is throwing error for get_price method

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.

Example code throws error

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.