Python Script to Scrape Wattpad Story and convert to Epub and html file.
- A html file of the entire Wattpad Book AND (You can directly Use this one to read, Images are preserved in this format.)
- A Epub file of the entire Wattpad Book.(The Epub will have separate marked Chapters instead of all chapters as one whole. Images included.)
- Pyperclip
- Requests
- BeautifulSoup4
- re
- Pypandoc
- argparse
Installing via pypandoc is possible on Windows, Mac OS X or Linux (Intel-based, 64-bit):
# expects an installed pypandoc: pip install pypandoc
from pypandoc.pandoc_download import download_pandoc
# see the documentation how to customize the installation path
# but be aware that you then need to include it in the `PATH`
download_pandoc()
The default install location is included in the search path for pandoc, so you don't need to add it to the PATH.
HOW TO USE :1. Just copy the URL of any Story of the Wattpad Book. I repeat copy URL of any "Story"... you got it!
-
Either Directly Run
Wattpad2epub.py or Wattpad2epub.py Story_url #Pyperclip library not needed for this.
Yes, it can take 1 Commandline Argument as the copied url of the Story.
-
You got html and epub saved in the same location.