Resolves aliases in translated tags. For example, say we lookup `遠坂凛`
and find `tohsaka_rin` and `toosaka_rin`. We apply aliases so that
`tohsaka_rin` becomes `toosaka_rin`, which is then returned as the only
translated tag.
Fixes an `undefined method `gsub' for nil:NilClass` exception when fetching source
data for this url:
* /uploads/new?url=https%3A%2F%2Fuiti-ukumo.tumblr.com%2Fpost%2F156157443158%2F2016-12
Bug introduced in 3c524aa5: `url` wasn't initialized due to `@url = url`
being removed from Sources::Site#initialize.
Unlike this projects, all other DA scrapers I found[0] require that both
"auth" and "auth_secure" are set.
While the current approach, for some reason, seems to have worked fine in
the past, it has stopped functioning on some systems, sometimes
permanently (apparently sometimes only temporarily).
I don't have the means to find out the reason behind that, since all
configurations I've tried (mobile, VPN, and regular connection +
4 seperate accounts) resulted in me being effectively logged out and
unable to view mature works after deleting the "auth_secure" cookie.
The "if auth_cookie" part might not actually be necessary, its only
purpose is to prevent unintended breakage due to lack of information
on my part.
[0]: b662b46a44 (diff-aab4e263d591d1c7f23d015a2e540a32R161)cbaecf5507 (diff-9f9821e7d744874a2fe42e0a69e4b14aR33)
* Only suggest the Danbooru tag with the same name if there is no
matching wiki other name. Example: if we have the Pixiv tag `Fate` and
the Danbooru tag `fate_(series)` with other name `fate`, suggest that,
not the Danbooru tag `fate`.
* Don't suggest tags that are empty or whose wiki is deleted.
* Only split tags on "/" if there are no other matches, and only for Pixiv.
* For Pixiv, only include traditional media tags in tag list, not digital media (Photoshop, SAI).
* Add some tests.
* Convert Tumblr commentary to DText.
* Strip extraneous whitespace in links and blockquotes.
* Add newlines after block elements to ensure they're separated from
subsequent blocks.