<commit_before><link rel="import" href="../connector.html">

<script>

    /**
     *
     */
    class EightMuses extends Connector {

        /**
         *
         */
        constructor() {
            super();
            // Public members for usage in UI (mandatory)
            super.id         = '8muses';
            super.label      = '8muses';
            this.tags        = [ 'hentai', 'porn', 'english' ];
            super.isLocked   = false;
            // Private members for internal usage only (convenience)
            this.url         = 'https://www.8muses.com';
            // Private members for internal use that can be configured by the user through settings menu (set to undefined or false to hide from settings menu!)
            this.config = undefined;
        }

        /**
         * Overwrite base function to get manga from clipboard link.
         */
        _getMangaFromURI( uri ) {
            return this.fetchDOM( uri.href, 'div#top-menu div.top-menu-breadcrumb ol li:nth-of-type(2) a', 3 )
            .then( data => {
                let id = uri.pathname;
                let title = data[0].text.trim();
                return Promise.resolve( new Manga( this, id, title ) );
            } );
        }

        /**
         *
         */
        _getMangaList( callback ) {
            let msg = 'This website does not support mangas/chapters, please copy and paste the links containing the images you want to download directly from your browser into HakuNeko.';
            callback( new Error( msg ), undefined );
        }

        /**
         *
         */
        _getChapterList( manga, callback ) {
            this.fetchDOM( this.url + manga.id, 'div#top-menu div.top-menu-breadcrumb ol li a' )
            .then( data => {
                let chapterList = [ {
                    id: manga.id,
                    title: data.slice(2).map( element => element.text.trim() ).join( ' → ' ),
                    language: ''
                } ];
                callback( null, chapterList );
            } )
            .catch( error => {
                console.error( error, manga );
                callback( error, undefined );
            } );
        }

        /**
         *<commit_msg>[8muses] update manha list message<commit_after><link rel="import" href="../connector.html">

<script>

    /**
     *
     */
    class EightMuses extends Connector {

        /**
         *
         */
        constructor() {
            super();
            // Public members for usage in UI (mandatory)
            super.id         = '8muses';
            super.label      = '8muses';
            this.tags        = [ 'hentai', 'porn', 'english' ];
            super.isLocked   = false;
            // Private members for internal usage only (convenience)
            this.url         = 'https://www.8muses.com';
            // Private members for internal use that can be configured by the user through settings menu (set to undefined or false to hide from settings menu!)
            this.config = undefined;
        }

        /**
         * Overwrite base function to get manga from clipboard link.
         */
        _getMangaFromURI( uri ) {
            return this.fetchDOM( uri.href, 'div#top-menu div.top-menu-breadcrumb ol li:nth-of-type(2) a', 3 )
            .then( data => {
                let id = uri.pathname;
                let title = data[0].text.trim();
                return Promise.resolve( new Manga( this, id, title ) );
            } );
        }

        /**
         *
         */
        _getMangaList( callback ) {
            let msg = 'This website does not provide a manga list, please copy and paste the URL containing the images directly from your browser into HakuNeko.';
            callback( new Error( msg ), undefined );
        }

        /**
         *
         */
        _getChapterList( manga, callback ) {
            this.fetchDOM( this.url + manga.id, 'div#top-menu div.top-menu-breadcrumb ol li a' )
            .then( data => {
                let chapterList = [ {
                    id: manga.id,
                    title: data.slice(2).map( element => element.text.trim() ).join( ' → ' ),
                    language: ''
                } ];
                callback( null, chapterList );
            } )
            .catch( error => {
                console.error( error, manga );
                callback( error, undefined );
            } );
        }

        /**
         *
{'fraction_non_alphanumeric': 0.11472488304744932, 'fraction_numerical': 0.003341501447983961, 'mean_word_length': 1.3072970195272353, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6883528', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1162, 'n_words': 336}