Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/architrixs/wattpad2epub
Python Script to Scrape Wattpad Story and convert to Epub and html file. Easiest to use.
https://github.com/architrixs/wattpad2epub
beautifulsoup4 ebooks epub html pypandoc pyperclip python python-script pythonscript requests wattpad wattpad-book wattpad-download wattpad-epub webscraper webscraping
Last synced: 18 days ago
JSON representation
Python Script to Scrape Wattpad Story and convert to Epub and html file. Easiest to use.
- Host: GitHub
- URL: https://github.com/architrixs/wattpad2epub
- Owner: Architrixs
- License: gpl-2.0
- Created: 2020-11-05T07:46:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-02T11:01:04.000Z (over 1 year ago)
- Last Synced: 2024-10-12T07:13:59.944Z (about 1 month ago)
- Topics: beautifulsoup4, ebooks, epub, html, pypandoc, pyperclip, python, python-script, pythonscript, requests, wattpad, wattpad-book, wattpad-download, wattpad-epub, webscraper, webscraping
- Language: Python
- Homepage:
- Size: 217 KB
- Stars: 29
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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`
2. Either Directly RunWattpad2epub.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.
3. You got html and epub saved in the same location.![Image of Wattpad2Epub](https://github.com/Architrixs/Wattpad2Epub/blob/main/Image_wattpad2Epub.png)
![Image of Wattpad2epub Windows](https://github.com/Architrixs/Wattpad2Epub/blob/main/wattpad2epub-windows.JPG)### I found my script easy to use, but feel free to point out mistakes. Open Issues if you find any.