Exemplo n.º 1
0
# -*- coding:UTF-8  -*-
"""
命令行入口文件,非IDE执行
@author: hikaru
email: [email protected]
如有问题或建议请联系
"""
import os
import sys
root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..\\.."))
if root_path not in sys.path:
    sys.path.append(root_path)
os.chdir(root_path)
import steamCommon
import badges

account_id = steamCommon.get_account_id_from_file()
badges.main(account_id)
Exemplo n.º 2
0
                if discount_info["type"] == "bundle" and include_type & 4 == 0:
                    continue
                is_all = True
                # 遍历包含的全部游戏,如果都有了,则跳过
                for app_id in discount_info["app_id"]:
                    if app_id not in owned_game_list:
                        is_all = False
                        break
                if not is_all:
                    if discount_info["type"] == "bundle":
                        output.print_msg("http://store.steampowered.com/bundle/%s/ ,discount %s%%, old price: %s, discount price: %s" % (discount_info["id"], discount_info["discount"], discount_info["old_price"], discount_info["now_price"]), False)
                    else:
                        output.print_msg("http://store.steampowered.com/sub/%s ,discount %s%%, old price: %s, discount price: %s" % (discount_info["id"], discount_info["discount"], discount_info["old_price"], discount_info["now_price"]), False)
            else:
                if include_type & 1 == 0:
                    continue
                if discount_info["app_id"] not in owned_game_list:
                    output.print_msg("http://store.steampowered.com/app/%s/ ,discount %s%%, old price: %s, discount price: %s" % (discount_info["id"], discount_info["discount"], discount_info["old_price"], discount_info["now_price"]), False)


if __name__ == "__main__":
    include_type_id = 0
    if INCLUDE_GAME:
        include_type_id += 1
    if INCLUDE_PACKAGE:
        include_type_id += 2
    if INCLUDE_BUNDLE:
        include_type_id += 4

    main(steamCommon.get_account_id_from_file(), include_type_id, MIN_DISCOUNT_PERCENT, MAX_SELLING_PERCENT)