Scrapling
Scrapling copied to clipboard
[Bug]: Reddit .json API endpoints return 403 Forbidden — all fetchers, all versions
Description
Reddit's .json API endpoints (e.g., https://www.reddit.com/r/worldnews/hot.json) return 403 Forbidden regardless of fetcher type, User-Agent, or Scrapling version.
Environment
- Scrapling: 0.4.10 AND 0.4.12 (both tested)
- Fetchers tested:
get,fetch(DynamicFetcher),stealthy-fetch - OS: Ubuntu 24.04, Python 3.12
Reproduction
# All three return 403:
scrapling extract get "https://www.reddit.com/r/worldnews/hot.json" /tmp/out.txt
scrapling extract fetch "https://www.reddit.com/r/worldnews/hot.json" /tmp/out.txt --headless
# Even with raw curl + browser UA:
curl -s -o /dev/null -w "%{http_code}" \
"https://www.reddit.com/r/worldnews/hot.json" \
-H "User-Agent: Mozilla/5.0 ..."
# → 403
Workaround
HTML pages (/r/subreddit/hot/) work fine with DynamicFetcher + --wait-selector "shreddit-post". Only .json endpoints are blocked.
Question
Is this a known limitation? Has Reddit fully deprecated unauthenticated .json access, or is this a Scrapling-specific issue with JSON content-type handling?
Hi, it's not a bug from Scrapling. Reddit is blocking any unauthenticated requests to the json URL. Try opening it in an incognito window in your browser, and you will get blocked.