Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

4chan API, 403?

Name: Anonymous 2013-07-27 18:37

Why does the 4chan API return 403 in code but if I hit it directly in my browser it's fine?

Any ideas?

        url = 'http://api.4chan.org/b/1.json'
        userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0'

        headers = {'User-Agent' : userAgent}#'Accept-encoding':'gzip'}

        request = urllib.request.Request(url, headers = headers)
        response = urllib.request.urlopen(request)
        html = response.read()

        print(html)

Name: Anonymous 2013-07-28 23:35

>>10
Where in the 4chan API does it say that this dump is supposed to honor ACCEPT?  Exactly. Now shut up, know your role, and go scrub another mother fucking toilet.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List