maxisoft / ASFFreeGames

Collect free steam games while asf is running
GNU Affero General Public License v3.0
121 stars 2 forks source link

Can't connect to the reddit #75

Open GwynbleiddI opened 1 month ago

GwynbleiddI commented 1 month ago

2024-05-23 20:41:40|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:40|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился неудачей после 1 попыток! 2024-05-23 20:41:40|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос не удался: https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:41|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:41|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился неудачей после 1 попыток! 2024-05-23 20:41:41|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос не удался: https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:42|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:42|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился неудачей после 1 попыток! 2024-05-23 20:41:42|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос не удался: https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:44|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:44|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился неудачей после 1 попыток! 2024-05-23 20:41:44|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос не удался: https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:47|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:47|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился неудачей после 1 попыток! 2024-05-23 20:41:47|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос не удался: https://www.reddit.com/user/ASFinfo.json?sort=new 2024-05-23 20:41:47|ArchiSteamFarm-22808|ERROR|ASF|CollectGames() Unable to load json from reddit RedditServerException: content is null

ASF:

ASF: v6.0.2.6 Plugin: v1.5.3

maxisoft commented 1 month ago

Hello @GwynbleiddI,

Thank you for reporting this issue. After reviewing the logs, it's seems that the requests to Reddit are being denied, resulting in a Forbidden status. This could be attributed to a few potential causes:

To assist us in resolving this issue, could you please confirm if you can access the following URL from your regular browser: https://www.reddit.com/user/ASFinfo.json?sort=new

I will keep this issue open to collect more information and determine if this is affecting other users as well.

Best regards, maxisoft

GwynbleiddI commented 1 month ago

Really the problem was address blocking. My AFS is located on remote servers in the Netherlands. Connecting to a VPN solved the problem.

kaiserdj commented 1 month ago

First of all, thank you very much for the excellent work on this plugin.

I'd like to suggest a new feature that I think could benefit many users: the option to use a proxy for Reddit requests. Currently, some of us are looking at ASF on VPS whose IP is blocked by Reddit, preventing the plugin from working properly.

Adding an option to configure a proxy will allow you to bypass these restrictions and improve the accessibility of the plugin from different hosting environments.

I appreciate your attention and consideration for this request.

C4illin commented 1 month ago

Hello, I am the developer of the bot you are parsing https://github.com/C4illin/ASFinfo

Maybe you could use https://gist.github.com/C4illin/77a4bcb9a9a7a95e5f291badc93ec6cd instead, it's the same data as posted on reddit.

maxisoft commented 4 weeks ago

Hey guys,

Thanks for your comments!

@kaiserdj - You're welcome. Adding proxy support is a fantastic suggestion, and I'll definitely aim to incorporate that into the next version. The main challenge right now is ensuring compatibility with ASF's trimmed version to avoid further MissingMethodException issues.

@C4illin - Thanks for reaching out and offering your work! I trully appreciate you maintaining the ASFinfo bot.
While I can't directly swap the Reddit API call for your Gist due to needing the free-to-play or is a dlc data (which isn't included in the gist), it's a fantastic resource to have as a backup in case Reddit is not reachable.
That being said, there's always the possibility of GitHub blocking those same VPN/VPS IPs too.

Additional Ideas

In summary:

I'll keep this issue updated as I make progress.