function retrieveNovelScanlationGroup(HTML, selector, row, retries){
    const $ = cheerio.load(HTML);

    try{

        // Get the 2nd TD element from each TR in the table; it's usually 
        // where the translation group column is located.
        let group = $($(selector).get(row)).text();

        group = group.trim();
        group = group.replace(/[~!@#$%^&*(')_+"’]/,"");

        return group;
    }catch(err){

        if(retries>0){
            
            errDict.getError(8);
            errDict.customError(err.message);
            pretty.logPrint(`Retrying to retrieve novel chapter group translator name ... (Retries left: ${retries-1})`);
            return retrieveNovelScanlationGroup(HTML,selector,retries-1);
        }
        else{

            errDict.getError(9);
            return null;
        }
    }

}
/**
 * Retrieves the group scanlation name of the novel.
 * 
 * @param {String} HTML The HTML body retrieved from the request package
 * @param {String} selector The set of string CSS selector for the group translation name
 * @param {Number} row The current row index in the table
 * @param {Number} retries This is the maximum number of retries till error gets thrown
 * @returns The source name of the group translation, null if error or does not exist.
 */
Retrieves the group scanlation name of the novel.


Retrieves the group scanlation name of the novel .
function retrieveNovelScanlationGroup(HTML, selector, row, retries){
    const $ = cheerio.load(HTML);
    try{
        let group = $($(selector).get(row)).text();
        group = group.trim();
        group = group.replace(/[~!@#$%^&*(')_+"’]/,"");
        return group;
    }catch(err){
        if(retries>0){
            errDict.getError(8);
            errDict.customError(err.message);
            pretty.logPrint(`Retrying to retrieve novel chapter group translator name ... (Retries left: ${retries-1})`);
            return retrieveNovelScanlationGroup(HTML,selector,retries-1);
        }
        else{
            errDict.getError(9);
            return null;
        }
    }
}
function retrieveNovelScanlationGroup ( HTML , selector , row , retries ) { const $ = cheerio . load ( HTML ) ; try { let group = $ ( $ ( selector ) . get ( row ) ) . text ( ) ; group = group . trim ( ) ; group = group . replace ( / [~!@#$%^&*(')_+"’]/, " " ); return group ; } catch ( err ) { if ( retries > 0 ) { errDict . getError ( 8 ) ; errDict . customError ( err . message ) ; pretty . logPrint ( ` ${ retries - 1 } ` ) ; return retrieveNovelScanlationGroup ( HTML , selector , retries - 1 ) ; } else { errDict . getError ( 9 ) ; return null ; } } }
Retrieves the group scanlation name of the novel.
Retrieves the group scanlation name of the novel .
// Get the 2nd TD element from each TR in the table; it's usually  // where the translation group column is located.