2

I'm trying to find lists of anime by genre in plaintext. Basically, the issue is that every anime list I can find online (MAL, ANN, Anime Planet) is stylised in some way, which isn't conducive to copy-pasting. I'd like the lists in plaintext.

Gao
  • 9,603
  • 8
  • 57
  • 96
Mathime
  • 177
  • 1
  • 9
  • this question belongs on stack overflow or power user. That said, you might want to try using this -> https://blog.scrapinghub.com/2016/02/17/portia-alternative-to-kimono/ – ton.yeung Apr 15 '16 at 16:47
  • what do you mean by copy-pasting? is xml/json ok? then you could also look at apis of different sites, like myanimelist. – Armin Apr 15 '16 at 17:36
  • 4
    @ton.yeung: No, this question does **not** belong on Stack Overflow. – Makoto Apr 15 '16 at 19:30
  • MAL's API was remarkably useless as of a year or two ago. It might've improved since DeNA bought them, though. – senshin Apr 16 '16 at 04:09
  • it may be possible to create a PHP Unit Script to run on Selenium to loop though every page of say MAL's anime list and run Javascript script to extract the data from the page and generate a sort of database only containing titles and genre which then could be used to generate a copy and paste friendly list....but weather someone will do that or not is another question – Memor-X Apr 16 '16 at 05:32

3 Answers3

3

I wrote a small script that operates on the Wikipedia page that Arcane provided.

var anime = "";

$('#mw-pages li').each(function(key, value)
{
    anime += ($(this).text() + '\n');
});

// Credit to: http://stackoverflow.com/a/18197341/3571997
function download(filename, text) 
{
    var element = document.createElement('a');
    element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
    element.setAttribute('download', filename);

    element.style.display = 'none';
    document.body.appendChild(element);

    element.click();

    document.body.removeChild(element);
}

download($('#firstHeading').text() + '.txt', anime);

How to use:

  1. Start a browser that can inject JavaScript into a page (I will use Google Chrome for this demonstration).
  2. Navigate to a category on the Wikipage (e.g. https://en.wikipedia.org/wiki/Category:Fantasy_anime_and_manga).
  3. Open the developer console (F12) and click on the console tab.
  4. Copy and paste the script in there and press Enter.
  5. You should now receive a text file with all of the anime of this genre.

Remarks:

  • It also lists manga, visual novels etc.
  • Not user friendly.

I shall try to update (and turn it into a userscript) whenever I have more time on my hands.

Gao
  • 9,603
  • 8
  • 57
  • 96
Alagaros
  • 2,440
  • 3
  • 21
  • 49
2

AniDB has api with their titles in single xml https://wiki.anidb.net/w/API

<?xml version="1.0" encoding="UTF-8"?>
<animetitles>
    <anime aid="1">
        <title type="short" xml:lang="en">CotS</title>
        <title xml:lang="fr" type="official">Crest of the Stars</title>
        <title xml:lang="en" type="official">Crest of the Stars</title>
        <title type="official" xml:lang="pl">Crest of the Stars</title>
        <title type="syn" xml:lang="cs">Hvězdný erb</title>
        <title type="main" xml:lang="x-jat">Seikai no Monshou</title>
        <title xml:lang="x-jat" type="short">SnM</title>
        <title type="syn" xml:lang="zh-Hans">星界之纹章</title>
        <title type="official" xml:lang="ja">星界の紋章</title>
    </anime>
ZeroQI
  • 21
  • 1
1

Wikipedia to the rescue

I'd start from here. Each genre has the list of Anime/Manga that are tagged for that genre. Seems like the thing you want

Arcane
  • 9,308
  • 8
  • 37
  • 77