Skip to content

Commit

Permalink
readcomiconline.to added
Browse files Browse the repository at this point in the history
Read changleog
  • Loading branch information
Xonshiz committed Jan 2, 2017
1 parent 6c69e23 commit 7dc76bd
Show file tree
Hide file tree
Showing 21 changed files with 520 additions and 11 deletions.
405 changes: 399 additions & 6 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
- Removed Kissmanga PhantomJS dependency [2016.12.23]
- Support for Python 2 and 3 has been merged [2016.12.28]
- Updated PhantomJS dependency in [supported sites](https://github.com/Xonshiz/comic-dl/blob/master/Supported_Sites.md) [2016.12.28]
- Added Icon (Logo) [2016.12.28]
- Added Icon (Logo) [2016.12.28]
- Added a YouTube Tutorial for the script [2016.12.30]
- Site support for readcomiconlin.to [2017.01.02]
1 change: 1 addition & 0 deletions Contributors.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Contributors
1.) [**`@shaggytwodope`**](https://github.com/shaggytwodope) :- [General Pep8 Fixes and clean up](https://github.com/Xonshiz/comic-dl/pull/1)

2.) [Ankit Passi](https://github.com/ankitpassi141) - Logo and icon designer
Binary file removed Images/Icon.ico
Binary file not shown.
Binary file modified Images/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Logo.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Comic-dl is a command line tool to download Comics and Manga from various Manga
* [Python Support](#python-support)
* [Windows Binary](#windows-binary)
* [List of Arguments](#list-of-arguments)
* [Youtube Tutorial](https://www.youtube.com/watch?v=TmQYhLHEZxA)
* [Usage](#usage)
* [Windows](#windows)
* [Linux/Debian](#linuxdebian)
Expand Down Expand Up @@ -138,6 +139,9 @@ Currently, the script supports these arguments :
#### Note :
Some websites like bato.to don't let you view some pages if you're not logged in. You'll have to create an account and pass the login information to the script via `-p` and `-u` arguments.

## Youtube Tutorial
[![Check The YouTube Tutorial](https://img.youtube.com/vi/TmQYhLHEZxA/0.jpg)](https://www.youtube.com/watch?v=TmQYhLHEZxA)

## Usage
With this script, you have to pass arguments in order to be able to download anything. Passing arguments in a script is pretty easy. Since the script is pretty basic, it doesn't have too many arguments. Go check the [`ARGUMENTS SECTION`](https://github.com/Xonshiz/comic-dl#list-of-arguments) to know more about which arguments the script offers.

Expand Down
3 changes: 2 additions & 1 deletion Supported_Sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
* [GoManga](http://gomanga.co/)
* [Batoto](http://bato.to/) [PhantomJS]
* [Kissmanga](http://kissmanga.com/)
* [Comic Naver](http://comic.naver.com/index.nhn)
* [Comic Naver](http://comic.naver.com/index.nhn)
* [Readcomiconline.to](http://readcomiconline.to/)
Binary file added comic_dl/downloader/__init__.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added comic_dl/downloader/cookies_required.pyc
Binary file not shown.
Binary file added comic_dl/downloader/universal.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions comic_dl/honcho.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from sites.batoto import batoto_Url_Check
from sites.kissmanga import kissmanga_Url_Check
from sites.comic_naver import comic_naver_Url_Check
from sites.readcomic import readcomic_Url_Check
from downloader import universal,cookies_required
from urllib.parse import urlparse

Expand Down Expand Up @@ -46,6 +47,8 @@ def url_checker(input_url, current_directory, User_Name, User_Password):

elif domain in ['comic.naver.com']:
comic_naver_Url_Check(input_url, current_directory)
elif domain in ['readcomiconline.to']:
readcomic_Url_Check(input_url, current_directory)

elif domain in ['']:
print('You need to specify at least 1 URL. Please run : comic-dl -h')
Expand Down
97 changes: 97 additions & 0 deletions comic_dl/sites/readcomic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import print_function
from builtins import str
from downloader.universal import main as FileDownloader
import re
import sys
import cfscrape
import os
from bs4 import BeautifulSoup


def readcomic_Url_Check(input_url, current_directory):

Issue_Regex = re.compile('https?://(?P<host>[^/]+)/Comic/(?P<comic>[\d\w-]+)(?:/Issue-)?(?P<issue>\d+)?')
Annual_Regex = re.compile('https?://(?P<host>[^/]+)/Comic/(?P<comic>[\d\w-]+)(?:/Annual-)?(?P<issue>\d+)?')
lines = input_url.split('\n')
for line in lines:
found = re.search(Issue_Regex, line)
if found:
match = found.groupdict()
if match['issue']:
Edited_Url = str(input_url) + '?&readType=1'
url = str(Edited_Url)
Single_Issue(url, current_directory)

else:
url = str(input_url)
Whole_Series(url, current_directory)

found = re.search(Annual_Regex, line)
if found:
match = found.groupdict()

if match['issue']:
Edited_Url = str(input_url) + '?&readType=1'
url = str(Edited_Url)
Single_Issue(url, current_directory)
else:
print()
'Uh, please check the link'

if not found:
print()
'Please Check Your URL one again!'
sys.exit()

def Single_Issue(url, current_directory):

scraper = cfscrape.create_scraper()
connection = scraper.get(url).content

Series_Name_Splitter = url.split('/')
Series_Name = str(Series_Name_Splitter[4]).replace('-', ' ')
Issue_Number_Splitter = str(Series_Name_Splitter[5])
Issue_Or_Annual_Split = str(Issue_Number_Splitter).split("?")
Issue_Or_Annual = str(Issue_Or_Annual_Split[0]).replace("-", " ").strip()
reg = re.findall(r'[(\d)]+', Issue_Number_Splitter)
Issue_Number = str(reg[0])

Raw_File_Directory = str(Series_Name) + '/' + "Chapter " + str(Issue_Or_Annual)

File_Directory = re.sub('[^A-Za-z0-9\-\.\'\#\/ ]+', '',
Raw_File_Directory) # Fix for "Special Characters" in The series name

Directory_path = os.path.normpath(File_Directory)

print('\n')
print('{:^80}'.format('=====================================================================\n'))
print('{:^80}'.format('%s - %s') % (Series_Name, Issue_Or_Annual))
print('{:^80}'.format('=====================================================================\n'))

linksList = re.findall('lstImages.push\(\"(.*?)\"\)\;', str(connection))

for link in linksList:
if not os.path.exists(File_Directory):
os.makedirs(File_Directory)
fileName = str(linksList.index(link)) + ".jpg"
FileDownloader(fileName, Directory_path, link)

def Whole_Series(url, current_directory):

scraper = cfscrape.create_scraper()
connection = scraper.get(url).content

soup = BeautifulSoup(connection, "html.parser")
all_links = soup.findAll('table', {'class': 'listing'})

for link in all_links:
x = link.findAll('a')
for a in x:
url = "http://readcomiconline.to" + a['href']
Single_Issue(url, current_directory=current_directory)
print("Finished Downloading")
2 changes: 1 addition & 1 deletion comic_dl/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
'''

__version__ = '2016.11.28'
__version__ = '2017.01.02'
4 changes: 3 additions & 1 deletion docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
- Removed Kissmanga PhantomJS dependency [2016.12.23]
- Support for Python 2 and 3 has been merged [2016.12.28]
- Updated PhantomJS dependency in [supported sites](https://github.com/Xonshiz/comic-dl/blob/master/Supported_Sites.md) [2016.12.28]
- Added Icon (Logo) [2016.12.28]
- Added Icon (Logo) [2016.12.28]
- Added a YouTube Tutorial for the script [2016.12.30]
- Site support for readcomiconlin.to [2017.01.02]
1 change: 1 addition & 0 deletions docs/Contributors.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Contributors
1.) [**`@shaggytwodope`**](https://github.com/shaggytwodope) :- [General Pep8 Fixes and clean up](https://github.com/Xonshiz/comic-dl/pull/1)

2.) [Ankit Passi](https://github.com/ankitpassi141) - Logo and icon designer
3 changes: 2 additions & 1 deletion docs/Supported_Sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
* [GoManga](http://gomanga.co/)
* [Batoto](http://bato.to/) [PhantomJS]
* [Kissmanga](http://kissmanga.com/)
* [Comic Naver](http://comic.naver.com/index.nhn)
* [Comic Naver](http://comic.naver.com/index.nhn)
* [Readcomiconline.to](http://readcomiconline.to/)
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Comic-dl is a command line tool to download Comics and Manga from various Manga
* [Python Support](#python-support)
* [Windows Binary](#windows-binary)
* [List of Arguments](#list-of-arguments)
* [Youtube Tutorial](https://www.youtube.com/watch?v=TmQYhLHEZxA)
* [Usage](#usage)
* [Windows](#windows)
* [Linux/Debian](#linuxdebian)
Expand Down Expand Up @@ -137,6 +138,9 @@ Currently, the script supports these arguments :
#### Note :
Some websites like bato.to don't let you view some pages if you're not logged in. You'll have to create an account and pass the login information to the script via `-p` and `-u` arguments.

## Youtube Tutorial
[![Check The YouTube Tutorial](https://img.youtube.com/vi/TmQYhLHEZxA/0.jpg)](https://www.youtube.com/watch?v=TmQYhLHEZxA)

## Usage
With this script, you have to pass arguments in order to be able to download anything. Passing arguments in a script is pretty easy. Since the script is pretty basic, it doesn't have too many arguments. Go check the [`ARGUMENTS SECTION`](http://comic-dl.readthedocs.io/en/latest/?badge=latest#list-of-arguments) to know more about which arguments the script offers.

Expand Down

0 comments on commit 7dc76bd

Please sign in to comment.