# -*- coding: utf-8 -*-
from __future__ import (unicode_literals, division, absolute_import, print_function)
__license__   = 'GPL v3'
__copyright__ = '2015, DaltonST <DaltonShiTzu@outlook.com>'
__my_version__ = "3.6.103" # Book-Level Scrubbing Tweaks

# ---------------------------------------------------------------------------------------
# Common keywords in Work Title, Work Series, Work Author to Remove
# ---------------------------------------------------------------------------------------
def __remove_bad_keywords(s_string):

    mynothing = ""

    s_string = str(s_string)

    #---------------
    s_string = str(s_string.replace("  ", " ", 8))
    s_string = str(s_string.strip())
    #---------------
    if s_string.startswith("Microsoft Word -"):
        s_string = str(s_string.replace("Microsoft Word -", mynothing, 1))
    s_string = str(s_string.replace("Microsoft Word", mynothing, 1))
    s_string = str(s_string.strip())
    if s_string.startswith("-"):
        s_string = str(s_string[1: ])
    s_string = str(s_string.strip())
    if s_string.endswith(" La") or s_string.endswith(" la"):
        s_string = str(s_string[0:-3])  #residual artifact from Novella
    if s_string.endswith(" Mystery Series)"):
        s_string = str(s_string.replace(" Mystery Series)", " )", 4))
     #---------------
    s_string = str(s_string.replace("  ", " ", 8))
    s_string = str(s_string.strip())
    #---------------
    s_string = str(s_string.replace("_", mynothing, 20))
    s_string = str(s_string.replace("--- Scanned by Number 4 ---", mynothing, 4))
    s_string = str(s_string.replace("--- Scanned by Number 5 ---", mynothing, 4))
    s_string = str(s_string.replace("--- Scanned by Number 6 ---", mynothing, 4))
    s_string = str(s_string.replace(": A New Adult Romance", mynothing, 4))
    s_string = str(s_string.replace(".doc", mynothing, 4))
    s_string = str(s_string.replace(".DOC", mynothing, 4))
    s_string = str(s_string.replace(".docx", mynothing, 4))
    s_string = str(s_string.replace(".indd", mynothing, 4))
    s_string = str(s_string.replace(".INDD", mynothing, 4))
    s_string = str(s_string.replace(".jpg", mynothing, 4))
    s_string = str(s_string.replace(".pdf", mynothing, 4))
    s_string = str(s_string.replace(".PDF", mynothing, 4))
    s_string = str(s_string.replace(".png", mynothing, 4))
    s_string = str(s_string.replace(".rar", mynothing, 4))
    s_string = str(s_string.replace(".txt", mynothing, 4))
    s_string = str(s_string.replace(".Txt", mynothing, 4))
    s_string = str(s_string.replace(".zip", mynothing, 4))

    s_string = str(s_string.replace(" Edited by", mynothing, 4))
    s_string = str(s_string.replace("(ebook by Undead)", mynothing, 4))
    s_string = str(s_string.replace("New Title 1", mynothing, 4))

    s_string = str(s_string.replace("(.v1.0.)).", mynothing, 4))  #caused by Quality Check plugin when fixing initials for authors
    s_string = str(s_string.replace("(ARC))", mynothing, 4))
    s_string = str(s_string.replace("(Book One in the ", "(Book #1:  ", 1))      #causes index to be set properly...
    s_string = str(s_string.replace("(Book Two in the ", "( Book #2: ", 1))
    s_string = str(s_string.replace("(Book Three in the ", "( Book #3: ", 1))
    s_string = str(s_string.replace("(Book Four in the ", "( Book #4: ", 1))
    s_string = str(s_string.replace("(Book Sets for Kids: Grade 3 and Up))", mynothing, 4))
    s_string = str(s_string.replace("(Book Sets for Kids: Grade 4 and Up))", mynothing, 4))
    s_string = str(s_string.replace("(Book Sets for Kids: Grade 5 and Up))", mynothing, 4))
    s_string = str(s_string.replace("(c.1))", mynothing, 4))  #Problem:  stripping utf8 characters also removes the ( and ))...
    s_string = str(s_string.replace("(c.2))", mynothing, 4))
    s_string = str(s_string.replace("(c.3))", mynothing, 4))
    s_string = str(s_string.replace("(c.4))", mynothing, 4))
    s_string = str(s_string.replace("(c.5))", mynothing, 4))
    s_string = str(s_string.replace("(c.6))", mynothing, 4))
    s_string = str(s_string.replace("(epub))", mynothing, 4))
    s_string = str(s_string.replace("(mobi))", mynothing, 4))
    s_string = str(s_string.replace("(New Deluxe Edition))", mynothing, 4))
    s_string = str(s_string.replace("(REVIEW))", mynothing, 4))
    s_string = str(s_string.replace("(v.1))", mynothing, 4))
    s_string = str(s_string.replace("(v.2))", mynothing, 4))
    s_string = str(s_string.replace("(v.3))", mynothing, 4))
    s_string = str(s_string.replace("(v.4))", mynothing, 4))
    s_string = str(s_string.replace("(v.5))", mynothing, 4))
    s_string = str(s_string.replace("(v.6))", mynothing, 4))
    s_string = str(s_string.replace("(v1.0))", mynothing, 4))
    s_string = str(s_string.replace("(v2.0))", mynothing, 4))
    s_string = str(s_string.replace("(v3.0))", mynothing, 4))
    s_string = str(s_string.replace("(v4.0))", mynothing, 4))
    s_string = str(s_string.replace("(v5.0))", mynothing, 4))
    s_string = str(s_string.replace("(v6.0))", mynothing, 4))
    s_string = str(s_string.replace("(Valancourt Classics))", mynothing, 4))
    s_string = str(s_string.replace("a Paranormal Romance", mynothing, 4))
    s_string = str(s_string.replace("admin", "_Unknown_", 4))
    s_string = str(s_string.replace("Admin", "_Unknown_", 4))
    s_string = str(s_string.replace("ARC: ", mynothing, 4))
    s_string = str(s_string.replace("BBW Paranormal Romance", mynothing, 4))
    s_string = str(s_string.replace("BBW Paranormal Werewolf Shifter Romance", mynothing, 4))
    s_string = str(s_string.replace("Billionaire Domination / Erotic Romance", mynothing, 4))
    s_string = str(s_string.replace("Billionaire Romance / Romantic Suspense", mynothing, 4))
    s_string = str(s_string.replace("BookZZ.org", mynothing, 4))
    s_string = str(s_string.replace("Bookzz.org", mynothing, 4))
    s_string = str(s_string.replace("bookzz.org", mynothing, 4))
    s_string = str(s_string.replace("c.1", mynothing, 4))
    s_string = str(s_string.replace("c.2", mynothing, 4))
    s_string = str(s_string.replace("c.3", mynothing, 4))
    s_string = str(s_string.replace("c.4", mynothing, 4))
    s_string = str(s_string.replace("c.5", mynothing, 4))
    s_string = str(s_string.replace("c.6", mynothing, 4))
    s_string = str(s_string.replace("ebook", mynothing, 4))
    s_string = str(s_string.replace("epub", mynothing, 4))
    s_string = str(s_string.replace("from Nexus Magazine", mynothing, 4))
    s_string = str(s_string.replace("Historical Romance", mynothing, 4))
    s_string = str(s_string.replace("Important ! Readme", mynothing, 4))
    s_string = str(s_string.replace("Important!", mynothing, 4))
    s_string = str(s_string.replace("int.indd", mynothing, 4))
    s_string = str(s_string.replace("INT.INDD", mynothing, 4))
    s_string = str(s_string.replace("Layout 1", mynothing, 4))
    s_string = str(s_string.replace("Layout 2", mynothing, 4))
    s_string = str(s_string.replace("Microsoft Office Word Document", mynothing, 4))
    s_string = str(s_string.replace("Microsoft Office", mynothing, 4))
    s_string = str(s_string.replace("Microsoft Word - ", mynothing, 4))
    s_string = str(s_string.replace("Microsoft Word - New Microsoft Office Word Document", mynothing, 4))
    s_string = str(s_string.replace("mobi", mynothing, 4))
    s_string = str(s_string.replace("Motorcycle Club Menage Erotica", mynothing, 4))
    s_string = str(s_string.replace("New Deluxe Edition", mynothing, 4))
    s_string = str(s_string.replace("New Microsoft Office Word Document", mynothing, 4))
    s_string = str(s_string.replace("Penguin Metro Reads", mynothing, 4))
    s_string = str(s_string.replace("Mystery Mystery", "Mystery", 2))
    s_string = str(s_string.replace("Mystery mystery", "Mystery", 2))

    #---------------------------------
    s_string = str(s_string.replace("R1.0", mynothing, 4))
    s_string = str(s_string.replace("r1.0", mynothing, 4))
    s_string = str(s_string.replace("R2.0", mynothing, 4))
    s_string = str(s_string.replace("r2.0", mynothing, 4))
    s_string = str(s_string.replace("R3.0", mynothing, 4))
    s_string = str(s_string.replace("r3.0", mynothing, 4))
    s_string = str(s_string.replace("R4.0", mynothing, 4))
    s_string = str(s_string.replace("r4.0", mynothing, 4))
    s_string = str(s_string.replace("R5.0", mynothing, 4))
    s_string = str(s_string.replace("r5.0", mynothing, 4))
    s_string = str(s_string.replace("R6.0", mynothing, 4))
    s_string = str(s_string.replace("r6.0", mynothing, 4))
    s_string = str(s_string.replace("R1.", mynothing, 4))
    s_string = str(s_string.replace("r1.", mynothing, 4))
    s_string = str(s_string.replace("R2.", mynothing, 4))
    s_string = str(s_string.replace("r2.", mynothing, 4))
    s_string = str(s_string.replace("R3.", mynothing, 4))
    s_string = str(s_string.replace("r3.", mynothing, 4))
    s_string = str(s_string.replace("R4.", mynothing, 4))
    s_string = str(s_string.replace("r4.", mynothing, 4))
    s_string = str(s_string.replace("R5.", mynothing, 4))
    s_string = str(s_string.replace("r5.", mynothing, 4))
    s_string = str(s_string.replace("R6.", mynothing, 4))
    s_string = str(s_string.replace("r6.", mynothing, 4))
    #-----------------------------------

    s_string = str(s_string.replace("Readme", mynothing, 4))

    s_string = str(s_string.replace("-Anthology", mynothing, 4))
    s_string = str(s_string.replace("[Anthology]", mynothing, 4))
    s_string = str(s_string.replace("Anthology", mynothing, 4))
    s_string = str(s_string.replace(".wps", mynothing, 4))
    s_string = str(s_string.replace("(Kindle Single)", mynothing, 4))
    s_string = str(s_string.replace("Kindle Single", mynothing, 4))
    s_string = str(s_string.replace("(Complete & Uncut)", mynothing, 4))
    s_string = str(s_string.replace("Complete & Uncut", mynothing, 4))


    s_string = str(s_string.replace("Small Press Distribution (All Titles))", mynothing, 4))
    s_string = str(s_string.replace("Small Press Distribution (All titles))", mynothing, 4))
    s_string = str(s_string.replace("Small Press Distribution", mynothing, 4))
    s_string = str(s_string.replace("Barnes & Noble Classics Series", mynothing, 4))
    s_string = str(s_string.replace("(Unabridged Penguin)", mynothing, 4))
    s_string = str(s_string.replace("Sweet Historical Mail Order Bride Romance", mynothing, 4))
    s_string = str(s_string.replace("Sweet, Clean Western Historical Romance", mynothing, 4))
    s_string = str(s_string.replace("Taboo Bareback Romance Novella", mynothing, 4))
    s_string = str(s_string.replace("Thorndike Press Large Print Basic Series", mynothing, 4))
    s_string = str(s_string.replace("Torrent downloaded from Demonoid.me", mynothing, 4))
    s_string = str(s_string.replace("Torrent downloaded from demonoid.ph", mynothing, 4))
    s_string = str(s_string.replace("Torrent downloaded from Demonoid", mynothing, 4))
    s_string = str(s_string.replace("Untitled Document", "_Unknown_", 4))
    s_string = str(s_string.replace("v1.0", mynothing, 4))
    s_string = str(s_string.replace("v2.0", mynothing, 4))
    s_string = str(s_string.replace("v3.0", mynothing, 4))
    s_string = str(s_string.replace("v4.0", mynothing, 4))
    s_string = str(s_string.replace("v5.0", mynothing, 4))
    s_string = str(s_string.replace("v6.0", mynothing, 4))
    s_string = str(s_string.replace("v.1", mynothing, 4))
    s_string = str(s_string.replace("v.2", mynothing, 4))
    s_string = str(s_string.replace("v.3", mynothing, 4))
    s_string = str(s_string.replace("v.4", mynothing, 4))
    s_string = str(s_string.replace("v.5", mynothing, 4))
    s_string = str(s_string.replace("v.6", mynothing, 4))
    s_string = str(s_string.replace("V1.0", mynothing, 4))
    s_string = str(s_string.replace("V2.0", mynothing, 4))
    s_string = str(s_string.replace("V3.0", mynothing, 4))
    s_string = str(s_string.replace("V4.0", mynothing, 4))
    s_string = str(s_string.replace("V5.0", mynothing, 4))
    s_string = str(s_string.replace("V6.0", mynothing, 4))
    s_string = str(s_string.replace("V.1", mynothing, 4))
    s_string = str(s_string.replace("V.2", mynothing, 4))
    s_string = str(s_string.replace("V.3", mynothing, 4))
    s_string = str(s_string.replace("V.4", mynothing, 4))
    s_string = str(s_string.replace("V.5", mynothing, 4))
    s_string = str(s_string.replace("V.6", mynothing, 4))
    s_string = str(s_string.replace("Valancourt Classics", mynothing, 4))
    s_string = str(s_string.replace("Vintage Contemporaries", mynothing, 4))
    s_string = str(s_string.replace("Werebear/BBW Paranormal Romance", mynothing, 4))
    s_string = str(s_string.replace("Word Document", mynothing, 4))
    s_string = str(s_string.replace("- 1.doc", mynothing, 1))  #the dash causes confusion and is garbage in this context
    s_string = str(s_string.replace("- 1.docx", mynothing, 1))
    s_string = str(s_string.replace("- 1.pdf", mynothing, 1))
    s_string = str(s_string.replace("- 1.txt", mynothing, 1))
    s_string = str(s_string.replace("- Microsoft Word -", mynothing, 1))
    s_string = str(s_string.replace("-Microsoft Word-", mynothing, 1))
    s_string = str(s_string.replace(": A Christmas Novel", mynothing, 1))
    s_string = str(s_string.replace(": A Contemporary Romance Novel", mynothing, 1))
    s_string = str(s_string.replace(": A Mystery", mynothing, 1))  #residual artifact
    s_string = str(s_string.replace(": a Mystery", mynothing, 1))  #residual artifact
    s_string = str(s_string.replace(": A New Adult Romance", mynothing, 1))
    s_string = str(s_string.replace(": A Novel of Suspense", mynothing, 1))
    s_string = str(s_string.replace(": A Novel", mynothing, 1))  #residual artifact
    s_string = str(s_string.replace(": a Novel", mynothing, 1))  #residual artifact
    s_string = str(s_string.replace(": A Novella", mynothing, 1))  #residual artifact
    s_string = str(s_string.replace(": a Novella", mynothing, 1))  #residual artifact
    s_string = str(s_string.replace(": An Thriller", mynothing, 1))  #residual artifact
    s_string = str(s_string.replace(": an Thriller", mynothing, 1))  #residual artifact
    s_string = str(s_string.replace(".docx", mynothing, 1))
    s_string = str(s_string.replace(".DOCX", mynothing, 1))
    s_string = str(s_string.replace(".doc", mynothing, 1))
    s_string = str(s_string.replace(".DOC", mynothing, 1))
    s_string = str(s_string.replace(".pdf", mynothing, 1))
    s_string = str(s_string.replace(".PDF", mynothing, 1))
    s_string = str(s_string.replace(".rtf", mynothing, 1))
    s_string = str(s_string.replace(".RTF", mynothing, 1))
    s_string = str(s_string.replace("(ARC)", mynothing, 1))
    s_string = str(s_string.replace("(BBW Paranormal Shape Shifter Romance)", mynothing, 1))
    s_string = str(s_string.replace("(BDSM Erotic Romance)", mynothing, 1))
    s_string = str(s_string.replace("(BDSM)", mynothing, 1))
    s_string = str(s_string.replace("(Contemporary Romance)", mynothing, 1))
    s_string = str(s_string.replace("(Fantasy, Paranormal, Romance)", mynothing, 1))
    s_string = str(s_string.replace("(Harlequin Kimani Romance)", mynothing, 1))
    s_string = str(s_string.replace("(Harlequin Romance)", mynothing, 1))
    s_string = str(s_string.replace("(Harlequin Superromance)", mynothing, 1))
    s_string = str(s_string.replace("(Historical Romance)", mynothing, 1))
    s_string = str(s_string.replace("(Paper Original)", mynothing, 1))
    s_string = str(s_string.replace("(Romance)", mynothing, 1))
    s_string = str(s_string.replace("(Short Story)", mynothing, 1))
    s_string = str(s_string.replace("(Siren Publishing Menage Amour)", mynothing, 1))
    s_string = str(s_string.replace("(Thorndike Press Large Print Basic Series)", mynothing, 1))
    s_string = str(s_string.replace("[En]", mynothing, 1))
    s_string = str(s_string.replace("**", mynothing, 4))
    s_string = str(s_string.replace("This Is an Advance Reader Copy Provided for Review Purposes Only. Not for Resale or Distribution", mynothing, 1))
    s_string = str(s_string.replace("This Is an Advance Reader Copy Provided for Review Purposes Only", mynothing, 1))
    s_string = str(s_string.replace("Advanced Reader's Copy Only. Not for Resale or Distribution", mynothing, 1))
    s_string = str(s_string.replace("Advanced Reader's Copy Only", mynothing, 1))
    s_string = str(s_string.replace("Advanced Reader's Copy", mynothing, 1))
    s_string = str(s_string.replace("*Retail Copy*", mynothing, 1))
    s_string = str(s_string.replace("BBW Billionaire Erotic Romance Novella", mynothing, 1))
    s_string = str(s_string.replace("BBW Romance -", mynothing, 1))
    s_string = str(s_string.replace("BBW Romance", mynothing, 1))
    s_string = str(s_string.replace("BDSM Erotic Romance", mynothing, 1))
    s_string = str(s_string.replace("BDSM", mynothing, 1))
    s_string = str(s_string.replace("Contemporary Romance", mynothing, 1))
    s_string = str(s_string.replace("Dodo Press", mynothing, 1))
    s_string = str(s_string.replace("Domination / Erotic Romance", mynothing, 1))
    s_string = str(s_string.replace("EBK.qxd", mynothing, 1))
    s_string = str(s_string.replace("Fantasy, Paranormal, Romance", mynothing, 1))
    s_string = str(s_string.replace("Harlequin Kimani Romance", mynothing, 1))
    s_string = str(s_string.replace("Harlequin Romance", mynothing, 1))
    s_string = str(s_string.replace("Harlequin Superromance", mynothing, 1))
    s_string = str(s_string.replace("Historical Romance", mynothing, 1))
    s_string = str(s_string.replace("Microsoft Word-", mynothing, 1))
    s_string = str(s_string.replace("Microsoft Word", mynothing, 1))
    s_string = str(s_string.replace("Paper Original", mynothing, 1))
    s_string = str(s_string.replace("Paperback", mynothing, 1))
    s_string = str(s_string.replace("Penguin Classics", mynothing, 1))
    s_string = str(s_string.replace("Retail Copy", mynothing, 1))
    s_string = str(s_string.replace("Romance / Romantic Suspense", mynothing, 1))
    #~ s_string = str(s_string.replace("Romance", mynothing, 1))  # also kills the Work Tag!
    s_string = str(s_string.replace("Short Story", mynothing, 1))               #Problem:  stripping utf8 characters also removes the ( and )...
    s_string = str(s_string.replace("Spanish Edition", mynothing, 1))
    s_string = str(s_string.replace("Spanish-language edition", mynothing, 1))
    s_string = str(s_string.replace("Thorndike Press Large Print Basic Series", mynothing, 1))
    s_string = str(s_string.replace("Vintage Espanol", mynothing, 1))
    s_string = str(s_string.replace("With Bonus Material", mynothing, 1))
    s_string = str(s_string.replace("Woman Hollering Creek--", mynothing, 1))


    #----------------------------------------------------------------------------------------------------------------
    s_string = str(s_string.replace("(digital)", mynothing, 1))           #common cbz/cbr keywords in title
    s_string = str(s_string.replace("(Digital)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-Midas)", mynothing, 1))
    s_string = str(s_string.replace("(minutemen-midas)", mynothing, 1))
    s_string = str(s_string.replace("(zone-empire)", mynothing, 1))
    s_string = str(s_string.replace("(Zone-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-Faessla)", mynothing, 1))
    s_string = str(s_string.replace("(minutemen-faessla)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-Spaztastic)", mynothing, 1))
    s_string = str(s_string.replace("(minutemen-spaztastic)", mynothing, 1))
    s_string = str(s_string.replace("(webrip)", mynothing, 1))
    s_string = str(s_string.replace("(Webrip)", mynothing, 1))
    s_string = str(s_string.replace("(GreenGiant-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(greengiant-dcp)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-PhD)", mynothing, 1))
    s_string = str(s_string.replace("(minutemen-phd)", mynothing, 1))
    s_string = str(s_string.replace("(2 covers)", mynothing, 1))
    s_string = str(s_string.replace("(2 Covers)", mynothing, 1))
    s_string = str(s_string.replace("All-New", mynothing, 1))
    s_string = str(s_string.replace("all-new", mynothing, 1))
    s_string = str(s_string.replace("(Digital Empire)", mynothing, 1))
    s_string = str(s_string.replace("(digital empire)", mynothing, 1))
    s_string = str(s_string.replace("(Zone-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(The Last Kryptonian-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(Ol' Joe-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(Webrip-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(ThatGuy-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Son of Ultron-Empire)", mynothing, 1))
    s_string = str(s_string.replace(" phuc ", mynothing, 1))
    s_string = str(s_string.replace("(- Nem -)", mynothing, 1))
    s_string = str(s_string.replace("(Dr. Greenthumb)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-Mollylvr)", mynothing, 1))
    s_string = str(s_string.replace("(Mephisto-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Cypher 2.0-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(OkC O M P U T O -Novus-HD)", mynothing, 1))
    s_string = str(s_string.replace("(BlackManta-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-Acan)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-FlynnLives)", mynothing, 1))
    s_string = str(s_string.replace("(Son of Ultron III-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(ThatGuy-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(AnHeroGold-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(TLK-EMPIRE-HD)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-WTF)", mynothing, 1))
    s_string = str(s_string.replace("(DR & Quinch-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Kileko-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(BlurPixel-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Nahga-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Sooth&Talon-Novus-HD)", mynothing, 1))
    s_string = str(s_string.replace("(d'argh-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Vee-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(AnPymGold-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-Hawaiian Punch)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-InnerDemons)", mynothing, 1))
    s_string = str(s_string.replace("(AnHeroGold-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-Ghus)", mynothing, 1))
    s_string = str(s_string.replace("(Kileko-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(UberSoldier-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(TheDemiurge-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(GreenManGroup-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(FatNerd)", mynothing, 1))
    s_string = str(s_string.replace("(webrip-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(Minutemen-Phantasm)", mynothing, 1))
    s_string = str(s_string.replace("(atomicmass77-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(digital-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(TheMaseThing-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(three covers)", mynothing, 1))
    s_string = str(s_string.replace("(Jojo)", mynothing, 1))
    s_string = str(s_string.replace("(Harkonnen-DCP)", mynothing, 1))
    s_string = str(s_string.replace("(phillywill-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Eos-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(TheArchivist-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Ookla-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(The Magicians-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Pirate-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Mr Norrell-Empire)", mynothing, 1))
    s_string = str(s_string.replace("(Meganubis)", mynothing, 1))
    #----------------------------------------------------------------------------------------------------------------

    s_string = str(s_string.replace("[html]", mynothing, 4))
    s_string = str(s_string.replace("(html)", mynothing, 4))
    s_string = str(s_string.replace("html", mynothing, 4))

    s_string = str(s_string.replace("()", mynothing, 1))

    s_string = str(s_string.replace("«", mynothing, 10))
    s_string = str(s_string.replace("»", mynothing, 10))
    s_string = str(s_string.replace("‹", mynothing, 10))
    s_string = str(s_string.replace("›", mynothing, 10))
    s_string = str(s_string.replace("†", mynothing, 10))
    s_string = str(s_string.replace("‡", mynothing, 10))
    s_string = str(s_string.replace("§", mynothing, 10))
    s_string = str(s_string.replace("•", mynothing, 10))
    s_string = str(s_string.replace("¶", mynothing, 10))
    s_string = str(s_string.replace("®", mynothing, 10))
    s_string = str(s_string.replace("©", mynothing, 10))
    s_string = str(s_string.replace("°", mynothing, 10))

     #---------------
    s_string = str(s_string.replace("  ", " ", 20))
    s_string = str(s_string.strip())
    #---------------

    if s_string.count("#") > 0:               #version 3.6.50 due to Graphic Novels processing
        s_string = s_string.replace(".1 ",".0 ",1)
        s_string = s_string.replace(".2 ",".0 ",1)
        s_string = s_string.replace(".3 ",".0 ",1)
        s_string = s_string.replace(".4 ",".0 ",1)
        s_string = s_string.replace(".6 ",".0 ",1)
        s_string = s_string.replace(".7 ",".0 ",1)
        s_string = s_string.replace(".8 ",".0 ",1)
        s_string = s_string.replace(".9 ",".0 ",1)
        s_string = s_string.replace(".00","",1)

    #---------------
    #final cleanup
    s_string = str(s_string.replace("()",mynothing,1))
    s_string = str(s_string.replace("[]",mynothing,1))
    s_string = str(s_string.replace("  ", " ", 10))
    s_string = str(s_string.strip())


    return str(s_string)
    #---------------



# ---------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------
#END OF booklevel_keywords.py