Git Product home page Git Product logo

wattpad2epub's Introduction

Wattpad2Epub

Python Script to Scrape Wattpad Story and convert to Epub and html file.

This program will create:

  1. A html file of the entire Wattpad Book AND (You can directly Use this one to read, Images are preserved in this format.)
  2. A Epub file of the entire Wattpad Book.(The Epub will have separate marked Chapters instead of all chapters as one whole. Images included.)

Libraries used :

  1. Pyperclip
  2. Requests
  3. BeautifulSoup4
  4. re
  5. Pypandoc
  6. argparse

Note: Pypandoc uses pandoc, so it needs an available installation of pandoc.

Installing pandoc via pypandoc

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!

It should look something like this: https://www.wattpad.com/story/39479-paper-ghosts

  1. 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.

  2. You got html and epub saved in the same location.

Image of Wattpad2Epub Image of Wattpad2epub Windows

I found my script easy to use, but feel free to point out mistakes. Open Issues if you find any.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.