I know that this is a complete mess and does not even come close to fitting PEP8.  That's why I'm posting it here.  I need help making it better.bookName      = NoneauthorName    = NonebookStartLine = NonebookEndLine   = Nonedef New_book(object):    def __init__(self, currentBookName, currentAuthorName, currentBookStartLine, currentBookEndLine):        self.currentBookName      = currentBookName        self.currentAuthorName    = currentAuthorName        self.currentBookStartLine = currentBookStartLine        self.currentBookEndLine   = currentBookEndLineimport urllib.requestdef parser(currentUrl): #parses texts to extract their title, author, begginning line and end line    global bookName    global authorName    global bookStartLine    global bookEndLine    global url    url = 'http://www.gutenberg.org/cache/epub/1232/pg1232.txt' #machiaveli    url = currentUrl        book = urllib.request.urlopen(url)    lines = book.readlines()    book.close()    finalLines = [line.decode()[:-2] for line in lines]    for line in finalLines:        if Title in line:            currentBookName = line[7:len(line)]            break    for line in finalLines:        if Author in line:            currentAuthorName = line[8:len(line)]            break    currentBookStartLine,currentBookEndLine = False,False    for index,line in enumerate(line,start=1):        if *** START OF THE PROJECT in line:            currentBookStartLine = index        if *** END OF THE PROJECT in line:            currentBookEndLine = index    url           = currentUrl    bookName      = currentBookName    authorName    = currentAuthorName    bookStartLine = currentBookStartLine    bookEndLine   = currentBookEndLineparser('http://www.gutenberg.org/cache/epub/768/pg768.txt') #wuthering heightsprint(url)print(bookName)print(authorName)print(bookStartLine)print(bookEndLine)
New book parser
python;beginner;parsing