danieltanfh95 / btapi

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

Toradora! (API problem with Alternative Adaptation part) #20

Closed danieltanfh95 closed 9 years ago

danieltanfh95 commented 9 years ago

Alternative adaptation not formatted well in the wiki. Probable deep link to find chapter keyword needed. Edge case.

image

danieltanfh95 commented 9 years ago

The parses managed to perform the deep-search and found the internal link and external links. Apparently for external links the parser will not know what to do with it as it does not follow any guideline in format. The parser now does this: if the external link has text of one word, then it takes the parent text, else, it takes the text. So for

<p>
You can read 
<a href="/project/index.php?title=User:Caster13&amp;action=edit&amp;redlink=1" class="new" title="User:Caster13 (page does not exist)">Caster13</a> 
adaptation at 
<a rel="nofollow" class="external text" href="http://inky-text.livejournal.com/7571.html">Livejournal The Literary Works of Caster</a> 
and/or discuss this adaptation on the forum 
<a rel="nofollow" class="external text" href="http://www.baka-tsuki.net/forums/viewtopic.php?f=53&amp;t=2435">here</a>
</p>

The first anchor is ignored, as it does not have a link. The second anchor is parsed as having title : Livejournal The Literary Works of Caster The third anchor is parsed as having title : You can read Caster13 adaptation at Livejournal The Literary Works of Caster and/or discuss this adaptation on the forum here

Recommendation to ignore external links unless it refers to a chapter.