danieltanfh95 / btapi

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

Problem one_off novel #27

Closed AzSiAz closed 8 years ago

AzSiAz commented 8 years ago

I saw something with one_off novel which I think should be corrected, there is difference between some one_off novel for example with A_Simple_Survey and Gekkou. JSON for A_Simple_Survey don't follow the same pattern as Gekkou, there is another chapters array inside the first chapters array, I saw the same problem with Hai_to_Gensou_no_Grimgal so those 2 might not be alone.

I think you should write a test to be sure about JSON data you get with every novel to check which novel is affected by this chapters array inside the first chapters array pattern

danieltanfh95 commented 8 years ago

Hmm, I think I would have to do a much complex check for one offs, since I'm now checking if the word "volume" is present in the table of contents to see if the book is a one off.

Perhaps I would try checking if they are no sub-levels for the volumes instead,

Yeah I think a test is needed, but I'm thinking of actually testing every page available since all of them has different formats...

danieltanfh95 commented 8 years ago

I also found that A_Simple_Survey does not have the correct cover listed.

danieltanfh95 commented 8 years ago

The code now searches for a specific ul element in the li element containing the title text to see if any volumes are listed to determine if it is a one off.

I may need to document any titles noted to be one offs to be included in the full body test in the future.