Koetje21
08/03/15 01:21AM
API redirect issues
Whenever my application tries to retrieve an image other than the preview image, the site redirects back to the images' post page. Is there any way to reach the actual resource? If there is any authentication procedure, what headers are required?

The API page does not contain any information about this, like at all.

Thanks to anyone who actually replies as many of the API related posts aren't getting any reponse. lol.
Sanitia
08/03/15 08:09AM
Can you give more info on what you are trying? This is how I currently use it:

1) Make a call to
rule34.xxx/index.php?page...;&limit=<LIMIT>

2) I get an XML of up to 100 posts back

3) I parse each post and get the "file_url".

This is from within a Chrome extension with permissions, so I haven't tried it outside of a browser. Are you just trying to access the "file_url" from outside of a browser and it doesn't work?

If you navigate to that URL in a browser, does it work then?
Koetje21
08/04/15 12:17AM
Sanitia said:
Can you give more info on what you are trying? This is how I currently use it:

1) Make a call to
rule34.xxx/index.php?page...;&limit=<LIMIT>

2) I get an XML of up to 100 posts back

3) I parse each post and get the "file_url".

This is from within a Chrome extension with permissions, so I haven't tried it outside of a browser. Are you just trying to access the "file_url" from outside of a browser and it doesn't work?

If you navigate to that URL in a browser, does it work then?


Thanks for the reply, I managed to get it to work. Apparently the API behaves similar to Danbooru, which has a more detailed documented API.

Anyway the problem was pretty simple actually. Whilst debugging I was trying to access the image resource by going to the generated URL from my application in my browser, which "lives" in a different session. The solution was to retrieve the resource via the application, which holds the same session id. Et voila it works.
1


Reply | Forum Index