import requests as r from bs4 import BeautifulSoup as bs import pypub import os #page = r.get('http://gutenberg.net.au/ebooks06/0600811h.html') #pagetext=page.text #cleanpage=pypub.clean( pagetext ) book= pypub.Epub('Book Title', creator="Robert E Howard", publisher='Project Gutenberg Australia') #xchapterone = pypub.ChapterFactory(cleanpage) z= pypub.create_chapter_from_url('http://gutenberg.net.au/ebooks06/0600811h.html') book.add_chapter(z) book.create_epub( os.getcwd() )