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

Pages: 1-

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-27 18:38

url = 'http://api.4chan.org/b/1.json'
/polecat kebabs/

Name: Anonymous 2013-07-27 19:06

>>2
le /g/ face trying to blend in! (OOPS I FORGOT MY LE STYLIZED EXCLAMATION MARK)

Name: Anonymous 2013-07-27 20:59

Try using Yumina to figure out what's different.

Name: Anonymous 2013-07-28 6:49

>>4

Yumina? Tried the Google and I get a bunch of fire emblem results

Name: Anonymous 2013-07-28 8:04

YOU MENA YUMINA

Name: Anonymous 2013-07-28 8:57

I figured it out.

Adding "accept" header does the trick.

'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',

Name: Anonymous 2013-07-28 9:09

>>3
awful!!!

Name: Anonymous 2013-07-28 19:38

>>5
Yumina the Wireshark

Name: Anonymous 2013-07-28 20:29

Sorry, my mistake for thinking this board would actually be insightful.

Last time I post here

Name: Anonymous 2013-07-28 20:38

>>10
Bye-ni.

Name: Anonymous 2013-07-28 20:48

>>10
Sorry buddy, it appears not many others here are using the 4chan api.

Name: Anonymous 2013-07-28 20:58

Just took a look at the github doc, seems it only works for the imageboards so there's not much point to it.

Name: Anonymous 2013-07-28 23:09

4chan api
What, you mean HTTP isn't?

Every goddamn website wants to have its own "app" and "API". Fucking useless "web 2.0" hipster shit.

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.

Name: Anonymous 2013-07-28 23:38

>>15
Can I scrub your anus instead, Kodak-kun?

Name: Anonymous 2013-07-28 23:39

>>16
Go away princess. Go far far away.

Name: Anonymous 2013-07-29 1:04

>>14
Oddly enough, I think "APIs" (which I think are poorly, poorly named in this context) could help the Web 2.bullshite, because at some point these people are going to wake up and realize that they aren't using the web anymore, they're just using TCP/IP over the internet, and most of the time they use port 80. (And there are other overlaps as well, but those may fade overtime.) It's going to suck for the first few years, because instead of `Web X.X' the memes you'll be reading about are shit like `Beyond the web!' and `Overcoming the stateless limitations of WWW' and `Paraweb programming' and `Webless XYZ!'  Of course, you'll still access all this shite from a browser, so browsers will now support `meta-web' paradigms and half-assed standards like approved JSON syntaxes for meta-web blogs, etc. etc.

At that point, however, the web will return to what it used to be, and we won't have to put up with all these framework circlejerks anymore.  It won't be a complete healing, and the web never will be as good as it used to be again.  Like newsgroups, it will survive only as a shell of its former self,but at least it won't be getting changed every week by fuckers who just want their names on the LIST OF INNOVATIVE PEOPLE.

Name: Anonymous 2013-07-29 1:18

>>17
u mad kodak-kun?

Name: One word 2013-07-29 3:40

Gopher

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