danieltanfh95/btapi

Novel Detail Seikoku no Ryun Kishi & https support

Closed this issue · 15 comments

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

  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.

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 :)

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)

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

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

May I know what is the error?

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

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.

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

@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.

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 ?

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.

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 :

  • Gekkou (API Cannot read property 'books' of undefined)
  • Iris_on_Rainy_Days (Api formatting data)
  • Mokushiroku_Arisu (API sections[0] isn't tome/chapter)
  • Remembrances_for_a_certain_pilot (API Cannot read property 'books' of undefined)
  • (Partially) Sugar_Dark (Broken volume list API)
  • Tabi_ni_Deyou,_Horobiyuku_Sekai_no_Hate_Made (API error : Cannot read property 'books' of undefined)
  • (Partially) Toradora! (API problem with Alternative Adaptation part)
  • Yume_Nikki (API Problem error : Cannot read property 'books' of undefined)

Sorry for putting another piece of work so soon..

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

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