Closed ibrahimigdir closed 3 months ago
Does it work if you do python -m discord_free_game_notifier.main
instead of python .\discord_free_game_notifier\main.py
?
"I was running it with python .\discord_free_game_notifier\main.py, but it worked when I ran it with the first code python -m discord_free_game_notifier.main. Thanks.
I have two more questions:
Is it normal for the outputs in the log to be this long? For example -> "Steam - Got steam.json {'free_games': [{'id': 'world_of_tanks_a_present_from_vinnie_pack', 'game_name': 'World of Tanks — A Present From Vinnie Pack', 'game_url': 'https://store.steampowered.com/app/2651870/World_of_Tanks__A_Present_From_Vinnie_Pack/', 'start_date': '2023-12-01T11:00:00+00:00', 'end_date': '2024-01-08T06:00:00+00:00', 'image_link': 'https://thelovinator1.github.io/discord-free-game-notifier/images/world_of_tanks_a_present_from_vinnie_pack.jpg', 'description': 'Winter fun has arrived in World of Tanks! Grab Holiday Ops resources to upgrade your Festive Village and an eye-catching decal with this exclusive, time-limited Holiday Ops Gift Pack DLC! Add the bundle to your account for free to get 50 of each Holiday Ops resource (Meteoric Iron, Pure Emerald, Rock Crystal, and Warm Amber) and 3 "Present from Vinnie" decals.', 'developer': 'Wargaming Group Limited'}, {'id': 'warframe_cumulus_collection', 'game_name': 'Warframe: Cumulus Collection', 'game_url': 'https://store.steampowered.com/app/2716340/Warframe_Cumulus_Collection/', 'start_date': '2023-12-18T21:00:00+00:00', 'end_date': '2024-01-14T21:00:00+00:00', 'image_link': 'https://thelovinator1.github.io/discord-free-game-notifier/images/warframe_cumulus_collection.jpg', 'description': 'Cirrus Armor Bundle, Cumulus Syandana, Stratus Pistol Skin, Spektaka Color Palette, and 3-day Resource Booster.', 'developer': 'Digital Extremes'}, {'id': 'world_of_tanks_snatch_gift_pack', 'game_name': 'World of Tanks — Snatch Gift Pack', 'game_url': 'https://store.steampowered.com/app/2749320/World_of_Tanks__Snatch_Gift_Pack/', 'start_date': '2024-01-11T15:00:00+00:00', 'end_date': '2024-01-24T00:00:00+00:00', 'image_link': 'https://thelovinator1.github.io/discord-free-game-notifier/images/world_of_tanks_snatch_gift_pack.jpg', 'description': 'The Snatch Gift Pack DLC includes:\n- 3 projection decals: Good Luck Charm\n- 3 Large Repair Kits\n- 3 Large First Aid Kits\n- 3 Automatic Fire Extinguishers', 'developer': 'Wargaming Group Limited'}, {'id': 'world_of_tanks_blitz_bene_gesserit_pack', 'game_name': 'World of Tanks Blitz - Bene Gesserit Pack', 'game_url': 'https://store.steampowered.com/app/2819910/World_of_Tanks_Blitz__Bene_Gesserit_Pack/', 'start_date': '2024-02-21T19:00:00+00:00', 'end_date': '2024-03-07T00:00:00+00:00', 'image_link': 'https://thelovinator1.github.io/discord-free-game-notifier/images/world_of_tanks_blitz_bene_gesserit_pack.jpg', 'description': 'The Bene Gesserit Pack includes:\n- Lady Jessica Profile Background\n- Bene Gesserit Epic avatar\n- Garage slot\n- 3 days of Premium Account\n- 5 certificates for x5 XP\n- 5 Epic Combat XP boosters', 'developer': 'Wargaming Group Limited'}, {'id': 'world_of_warships_azur_lane_free_intro_pack', 'game_name': 'World of Warships x Azur Lane: Free Intro Pack', 'game_url': 'https://store.steampowered.com/app/2985620/World_of_Warships__Azur_Lane_Free_Intro_Pack/', 'start_date': '2024-05-16T14:00:00+00:00', 'end_date': '2024-06-26T00:00:00+00:00', 'image_link': 'https://thelovinator1.github.io/discord-free-game-notifier/images/world_of_warships_azur_lane_free_intro_pack.jpg', 'description': 'The Azur Lane: Free Intro Pack includes:\n- 1x Azur Lane container\n- 5x “Azur Lane — Siren” expendable camouflages\n- Access to the Azur Lane Dorm Port', 'developer': 'Wargaming Group Limited'}, {'id': 'world_of_warships_azur_lane_al_avrora_free_unlock', 'game_name': 'World of Warships x Azur Lane — AL Avrora Free Unlock', 'game_url': 'https://store.steampowered.com/app/2985560/World_of_Warships__Azur_Lane__AL_Avrora_Free_Unlock/', 'start_date': '2024-05-16T14:00:00+00:00', 'end_date': '2024-06-26T00:00:00+00:00', 'image_link': 'https://thelovinator1.github.io/discord-free-game-notifier/images/world_of_warships_azur_lane_al_avrora_free_unlock.jpg', 'description': 'Play 5 battles to obtain:\n- AL Avrora - Tier III Premium Soviet cruiser\n- A Port slot\n- A Commander with 3 skill points trained for AL Avrora', 'developer': 'Wargaming Group Limited'}]}"
Can we also run this code as web services on render.com or alternatives?
I reduced the logging so the big ball of text should not be a eyesore anymore.
- Can we also run this code as web services on render.com or alternatives?
I have never used Render but probably if it can run Python code.
I reduced the logging so the big ball of text should not be a eyesore anymore.
- Can we also run this code as web services on render.com or alternatives?
I have never used Render but probably if it can run Python code.
Thank you logs, solved. I was also able to do it with render., thanks to Docker.
Well, I want to ask one more thing. I want to localize this incoming message, that is, I want to make it Turkish, which is my own language. What can I do or can I do about that?
https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/epic.py#L167 If you add ?locale=tr to the URL it looks like a few things get change to Turkish https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=tr
I haven't added a description yet so probably not worth it to translate?
You can add &l=turkish to the URL but I don't know if game titles are localized https://store.steampowered.com/search/?maxprice=free&specials=1&l=turkish
Site does not support Turkish so things from GOG will get the English title
I use steam.json, ubisoft.json and epic.json to add games that my bot fails to grab
If you want to use Turkish instead you will need to modify these to your own URL (may have to set up GitHub Pages for this to work), and then translate the file when I add new games: https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/epic_json.py#L156 https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/steam_json.py#L129 https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/ubisoft.py#L50
The files are created by modify the dict in the files above and then run each file (probably with python -m discord_free_game_notifier.steam_json (or other file names))
\discord-free-game-notifier-master\discord_free_game_notifier\main.py", line 10, in
from discord_free_game_notifier import settings
ModuleNotFoundError: No module named 'discord_free_game_notifier'
I'm trying to start the bot using windows both in the admin folder So, I tried to start it on disk C and on the desktop, but it doesn't matter in both, I get the same error.