danieltanfh95 / btapi

baka tsuki api clean up
http://btapi-shadowys.rhcloud.com/
8 stars 5 forks source link

Novel Detail Seikoku no Ryun Kishi & https support #11

Closed AzSiAz closed 8 years ago

AzSiAz commented 8 years ago

The novel detail for https://www.baka-tsuki.org/project/index.php?title=Seikoku_no_Ryuu_Kishi (api?title=Seikoku_no_Ryuu_Kishi) isn't working well The api return two array in sections instead of one, the first one isn't volume ordered (volume and chapter instead of chapter inside volume) but the second one seem to be ok but there is only the first story arc

Don't know if I should open a new issue or not but https support is planned ? iOS 9 deactivate http call inside an app and I need to modify a .plist to activated them again but it would be better if btapi directly support https

Thanks

danieltanfh95 commented 8 years ago
  1. I will check it out. Maybe the html for the page is mangled.
  2. I was hoping that btapi will be hosted on baka tsuki itself but Simon has not replied me. Anyway, baka-tsuki is also not https enabled, so that may have to wait a while.
AzSiAz commented 8 years ago

I edit my post but forget to say i did, the second array only has the first story arc Ok thank, no problem for https it's not really important :)

danieltanfh95 commented 8 years ago

Okay I saw it, the formatting was indeed mangled. It was completely different from any of the other formats so I may have to do this separately (maybe within a week or so)

AzSiAz commented 8 years ago

Take your time :) I will juste use the second array for it, since this project is halted it should be enough for now

AzSiAz commented 8 years ago

I don't really want to open a new issue for every novel detail, I think it's better to continue here can I ? there is a problem for Densetsu no Yūsha no Densest it throw an error

danieltanfh95 commented 8 years ago

May I know what is the error?

AzSiAz commented 8 years ago

with https://baka-tsuki-api.herokuapp.com/api?title=Densetsu_no_Yūsha_no_Densetsu I got : An error occurred in the application and your page could not be served. Please try again in a few moments. If you are the application owner, check your logs for details.

On mine if I look a the log it say : GET /api?title=Densetsu_no_Y%C5%ABsha_no_Densetsu so it seem like 'ū' is the problem because it's encoded and you expect an unencoded string on the server side

EDIT : I think it wouldn't be bad to assume almost every special character don't work like for Fate/Zero and '/'

EDIT 2 : partially or not working novel list at the end of the readme here https://github.com/AzSiAz/LN-Reader

danieltanfh95 commented 8 years ago

I've solved the Seikoku_no_Ryuu_Kishi problem through changes in the header arrangements for the page. Apparently it had an extra header in the table of contents. For Densetsu_no_Yūsha_no_Densetsu I'm still investigating the problem. The api have no problem accessing Fate/Zero or other URLs with special characters but somehow for Densetsu it can't download the data for the page, it's probably a unicode problem as you've said.

BTW: baka-tsuki just got a SSL certificate! Maybe some one can ask to include this API inside Baka tsuki itself so it can be accessed through HTTPS too.

danieltanfh95 commented 8 years ago

I've reencoded the string with encodeURI on each url call. Uploading the latest version to heroku.

danieltanfh95 commented 8 years ago

@AzSiAz Refer to Issue #12 . Https is now supported inside the api calls itself. Glad to see an iOS app for baka-tsuki coming out.

AzSiAz commented 8 years ago

Thank for Seikoku_no_Ryuu_Kishi and https inside api calls. I'm still not register in baka-tsuki someone should open a new topic for it.. Seem like almost every novel work even Zero_no_Tsukaima work again, now what left is to work on novel itself because with some of them chapter are tome or section[0] is wrongly set and so on. Another little question : to avoid calling api calls by nodejs every minute cache is planned ?

danieltanfh95 commented 8 years ago

Glad to hear that. I'm planning to save all of the data into a database, so the api calls can be cached and indexed (much better improvement over parsing the text everytime), but that will have to wait till the discussion is complete on the forums, so for now you might have to do local caching first.

AzSiAz commented 8 years ago

Yeah already doing that for offline use, well thanks for the answer And one more time here is the last check I made, with what is not working or not completely (with the latest version from git) might be incomplete thought :

Sorry for putting another piece of work so soon..

danieltanfh95 commented 8 years ago

Nice! I'll open an issue for each. Thanks for the information, save a lot of testing time on my end.

AzSiAz commented 8 years ago

no problem, if I found new one I will open a new issue