Front page insists I'm in Finland (Suomi) #216

Closed
opened 1 year ago by Pete · 3 comments
Pete commented 1 year ago

For a few days, and across multiple unlinked devices, the front page has been built from items popular in Finland instead of globablly. Clearly great for some, but not so much for me. Is there a way for a user to get the global picture without logging in?

Thanks!

For a few days, and across multiple unlinked devices, the front page has been built from items popular in Finland instead of globablly. Clearly great for some, but not so much for me. Is there a way for a user to get the global picture without logging in? Thanks!
teddit added the
bug
label 1 year ago
Owner

Interesting. Reddit has changed the behavior of the geo filtering.

Previously, when fetching JSON data from Reddit, we got "global content" no matter what. The documentated g parameter never worked, so it defaulted to "global" even if the request had geo filter parameter. The geo filtering has been broken for years 1, 2, 3.

But now, the geo filtering has been changed to return country-specific content based on the instance's geo location. For example, teddit.net is hosted in Finland, so Reddit is returning Finland specific content for the front page, even when the geo filter parameter is set to global in the code.

This can also be easily tested:

https://www.reddit.com/hot.json
https://www.reddit.com/hot.json?g=GLOBAL

Both of these return the same geo filtered content - the geo location parameter is ignored.

I'm not sure how to fix this. Hopefully Reddit fixes their shit. :(

Interesting. Reddit has changed the behavior of the geo filtering. Previously, when fetching JSON data from Reddit, we got "global content" no matter what. The [documentated `g` parameter](https://www.reddit.com/dev/api#GET_hot) never worked, so it defaulted to "*global*" even if the request had geo filter parameter. The geo filtering has been broken for years [1](https://www.reddit.com/r/bugs/comments/agfqrf/api_ignores_regional_post_settings/), [2](https://www.reddit.com/r/bugs/comments/7v3pd6/json_of_rpopular_with_geo_filter_is_different/), [3](https://www.reddit.com/r/bugs/comments/9orywy/rpopular_geofilter_not_working_for_united_states/). But now, the geo filtering has been changed to return country-specific content based on the instance's geo location. For example, teddit.net is hosted in Finland, so Reddit is returning Finland specific content for the front page, even when the geo filter parameter is set to *global* in the code. This can also be easily tested: https://www.reddit.com/hot.json https://www.reddit.com/hot.json?g=GLOBAL Both of these return the same geo filtered content - the geo location parameter is ignored. I'm not sure how to fix this. Hopefully Reddit fixes their shit. :(

I just did some testing in various different regions using a VPN. The only region where global works is the US, where it's the default. I don't believe reddit is going to fix this because adding ".json" to the end of the url comes from the old reddit, which I imagine reddit will deprecate soon.

Alternatively you can switch over to the graphql api (which isn't as nice to use) or maybe try pushshift (which may be hours behind live reddit).

I tried the graphql api using a Finnish ip and it seems to respect the global parameter.

This is the url:

https://gateway.reddit.com/desktopapi/v1/subreddits/popular?rtj=only&redditWebClient=web2x&app=web2x-client-production&allow_over18=&include=structuredStyles%2CprefsSubreddit&geo_filter=GLOBAL&sort=hot&layout=card&forceGeopopular=true

I just did some testing in various different regions using a VPN. The only region where global works is the US, where it's the default. I don't believe reddit is going to fix this because adding ".json" to the end of the url comes from the old reddit, which I imagine reddit will deprecate soon. Alternatively you can switch over to the graphql api (which isn't as nice to use) or maybe try pushshift (which may be hours behind live reddit). I tried the graphql api using a Finnish ip and it seems to respect the global parameter. This is the url: https://gateway.reddit.com/desktopapi/v1/subreddits/popular?rtj=only&redditWebClient=web2x&app=web2x-client-production&allow_over18=&include=structuredStyles%2CprefsSubreddit&geo_filter=GLOBAL&sort=hot&layout=card&forceGeopopular=true

Hey looks like they fixed this.

Hey looks like they fixed this.
teddit closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: teddit/teddit#216
Loading…
There is no content yet.