Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dipu-bd committed Jul 12, 2018
1 parent 6662ca4 commit 55746be
Show file tree
Hide file tree
Showing 45 changed files with 14 additions and 6,706 deletions.
143 changes: 0 additions & 143 deletions EbookCrawler/_lnmtl_old.py

This file was deleted.

133 changes: 0 additions & 133 deletions EbookCrawler/_wuxia_old.py

This file was deleted.

12 changes: 10 additions & 2 deletions EbookCrawler/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@
import random
import textwrap
from subprocess import call
from ebooklib import epub
from PIL import Image, ImageFont, ImageDraw

KINDLEGEN_PATH = os.path.join('lib', 'kindlegen', 'kindlegen')
try:
from ebooklib import epub
except:
print('Package ebooklib is required. Install it using-')
print(' python3 -m pip install --user --upgrade ebooklib')
print('Error: Package Not Found: "ebooklib"')
print()
# end try

KINDLEGEN_PATH = os.path.join('lib', 'kindlegen')
BOOK_PATH = '_book'


Expand Down
13 changes: 0 additions & 13 deletions EbookCrawler/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
"""Helper methods used in crawling"""
import json
from os import path, makedirs
from splinter import Browser

CHROME_DRIVER = path.join('lib', 'chromedriver')


def get_browser():
'''open a headless chrome browser in incognito mode'''
return Browser('chrome',
headless=True,
incognito=True,
executable_path=CHROME_DRIVER)
# end def


def save_chapter(content, output_path):
'''save content to file'''
Expand Down
2 changes: 1 addition & 1 deletion EbookCrawler/lnmtl.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import concurrent.futures
from bs4 import BeautifulSoup
from .binding import novel_to_kindle
from .helper import get_browser, save_chapter
from .helper import save_chapter

class LNMTLCrawler:
'''Crawler for LNMTL'''
Expand Down
2 changes: 1 addition & 1 deletion EbookCrawler/readln.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import concurrent.futures
from bs4 import BeautifulSoup
from .binding import novel_to_kindle
from .helper import get_browser, save_chapter
from .helper import save_chapter

class ReadLightNovelCrawler:
'''Crawler for ReadLightNovel'''
Expand Down
2 changes: 1 addition & 1 deletion EbookCrawler/webnovel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from os import path
import concurrent.futures
from .binding import novel_to_kindle
from .helper import get_browser, save_chapter
from .helper import save_chapter

class WebNovelCrawler:
'''Crawler for WuxiaWorld'''
Expand Down
2 changes: 1 addition & 1 deletion EbookCrawler/wuxia.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import concurrent.futures
from bs4 import BeautifulSoup
from .binding import novel_to_kindle
from .helper import get_browser, save_chapter
from .helper import save_chapter


class WuxiaCrawler:
Expand Down
File renamed without changes.
24 changes: 0 additions & 24 deletions lib/kindlegen/EULA.txt

This file was deleted.

Loading

0 comments on commit 55746be

Please sign in to comment.