Nickwasused / FreeGamesonSteam

Searching SteamDB for Free Games and Activating them using ArchiSteamFarm
Mozilla Public License 2.0
28 stars 5 forks source link

[BUG] #37

Closed osafaimal closed 2 years ago

osafaimal commented 3 years ago

Describe the bug i don t understand the code neither the problem thus i report here

To Reproduce Steps to reproduce the behavior:

  1. run the script
  2. See error

Expected behavior 'Not using Proxy Servers' Traceback (most recent call last): File "\FreeGamesonSteam-master.140\steam.py", line 214, in querygames() File "FreeGamesonSteam-master.140\steam.py", line 208, in querygames = json.loads() File "C:\Python39\lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Python39\lib\json\decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 49 (char 48)

Please complete the following information:

Additional context

Nickwasused commented 3 years ago

Can you send your steamconfig.py without your Steamid and Steam API Key?

osafaimal commented 3 years ago

!/usr/bin/env python3

-- coding: utf-8 --

Nickwasused

class config:

Config /Example for Bot (asf) bot_names = ["asf"]

# !Important please change the Settings here!
bots = []

# e.g multiple bots
# bots = ['{"name": "YOUR_BOT_NAME", "steamid": "YOUR_STEAM_ID_64"}, {"name": "YOUR_BOT_NAME_2", "steamid": "YOUR_STEAM_ID_64_2"}']

boturl = 'http://127.0.0.1:1242/Api/Command/'
botip = '127.0.0.1'
boturl = 'http://localhost:1242/Api/Command/'

# Log Default: true
log = 'true'
# Logfile Default: freegames-log
logfile = 'freegames.log'
# Proxys are disabled by default
proxy = 'disabled'
# Timeout for redeeming Keys: Default 2 Seconds
timeout = 2

#You dont need to change things here:
links = ['https://steamdb.info/sales/?min_discount=95&min_rating=0', 'https://steamdb.info/upcoming/free/#live-promotions']
basesteam = 'https://store.steampowered.com/app/'

def getsteamapilink(self, steamid):
    steam_api_key = ""
    return "https://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key={}&steamid={}&format=json".format(steam_api_key, steamid)

# You can change the User Agent here:
# Default: Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail appname/appversion
headers = {
    'User-Agent': 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail appname/appversion'
}
Nickwasused commented 3 years ago

There seems to be a Problem with your config but I can´t find it.

For comparison this is my config file:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Nickwasused

class config:
    # Config /Example for Bot (asf) bot_names = ["asf"]
    # !Important please change the Settings here!
    bots = ['{"name": "main", "steamid": "Your Steam ID should be here"}']

    # e.g multiple bots
    # bots = ['{"name": "YOUR_BOT_NAME", "steamid": "YOUR_STEAM_ID_64"}, {"name": "YOUR_BOT_NAME_2", "steamid": "YOUR_STEAM_ID_64_2"}']

    boturl = 'http://127.0.0.1:1242/Api/Command/'
    botip = '127.0.0.1'
    boturl = 'http://localhost:1242/Api/Command/'

    # Log Default: true
    log = 'true'
    # Logfile Default: freegames-log
    logfile = 'freegames.log'
    # Proxys are disabled by default
    proxy = 'disabled'
    # Timeout for redeeming Keys: Default 2 Seconds
    timeout = 2

    #You dont need to change things here:
    links = ['https://steamdb.info/sales/?min_discount=95&min_rating=0', 'https://steamdb.info/upcoming/free/#live-promotions']
    basesteam = 'https://store.steampowered.com/app/'

    def getsteamapilink(self, steamid):
        # https://steamcommunity.com/dev/apikey
        steam_api_key = "Your Steam API Key should be here"
        return "https://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key={}&steamid={}&format=json".format(steam_api_key, steamid)

    # You can change the User Agent here:
    # Default: Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail appname/appversion
    headers = {
        'User-Agent': 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail appname/appversion'
    }
Nickwasused commented 2 years ago

Please See #39