Giter Site home page Giter Site logo

ccdl's Introduction

ccdl

欢迎提交 PR

This is a package for downloading online comics.

Supported sites:

  • binb * :

    • r.binb.jp
    • www.cmoa.jp
    • booklive.jp
    • takeshobo.co.jp
    • www.comic-valkyrie.com
    • futabanet.jp
    • comic-polaris.jp
    • www.shonengahosha.co.jp
    • r-cbs.mangafactory.jp
    • comic-meteor.jp
  • comic_action:

    • comic-action.com
    • comic-days.com *
    • comic-gardo.com *
    • comic-zenon.com
    • comic-trail.com
    • comicborder.com
    • comicbushi-web.com
    • kuragebunch.com
    • ichijin-plus.com
    • magcomi.com
    • pocket.shonenmagazine.com *
    • shonenjumpplus.com *
    • sunday-webry.com
    • tonarinoyj.jp
    • to-corona-ex.com
    • viewer.heros-web.com
  • comic_earthstar:

    • viewer.comic-earthstar.jp
  • comic_walker:

    • comic-walker.com
  • ganganonline:

    • www.ganganonline.com
  • ganma:

    • ganma.jp
  • urasunday:

    • urasunday.com
  • yanmaga *:

    • yanmaga.jp

Install

For some sites, you'll need a version of chromedriver that matches the version of Chrome you've installed.

  $ git clone [email protected]:oxdz/ccdl.git

  $ cd ./ccdl
  
  # install dependencies
  $ pip install -r requirements.txt
  
  # install ccdl
  $ python ./setup.py install --user
  
  # Download the chromedriver
  $ wget https://cdn.npm.taobao.org/dist/chromedriver/86.0.4240.22/chromedriver_linux64.zip
  $ unzip chromedriver_linux64.zip
  $ rm chromedriver_linux64.zip

Usage

Strat with the code, for example

from selenium import webdriver

from ccdl import ComicLinkInfo
from ccdl import Binb2, ComicAction, Ganma


url = "https://comic-action.com/episode/13933686331709379523"

driver = webdriver.Chrome(executable_path='./chromedriver')

link_info = ComicLinkInfo(url)

reader = ComicAction(link_info, driver)
# or
"""
reader = SiteReaderLoader(link_info, driver)
reader.downloader() if reader else print("不支持的網站")
"""

reader.downloader()

Use CcdlSimpleStarter to download comics

Windows users can download the executable and double-click to run it.
The search path for chromedriver is the directory where the application resides.

If chromedriver exists: For sites with *, if necessary, login in the browser that opens automatically before you enter the URL.You also need to load (you can do this in any TAB) the URL in this browser.

$ python CcdlSimpleStarter.py

源碼: https://github.com/oxdz/ccdl

如需登入(含*)請提前在程式啟動的瀏覽器中登入並加載目標url(任意標籤頁)!


>>>>>>>>輸入exit退出<<<<<<<<

url: https://comic-action.com/episode/13933686331709379523
創建文件夾: ./漫畫/ネコ先輩さすがです!/第7話 寝方
|##################################################| 100% (4 of 4)
url:

Build executable

If you want to build the smallest executable file, please use the virtual environment to build

# create venv
$ python -m venv ./venv

# active venv
$ ./venv/Scripts/activate 

# upgrade wheel, setuptools
$ ./venv/Scripts/pip install --upgrade setuptools wheel

# install ccdl 
$ ./venv/Scripts/python ./setup.py install

# install  pyinstaller
$ ./venv/Scripts/pip install pyinstaller

# build executable
# If there is an error that the file top_level.txt does not exist, create a new one
$ ./venv/Scripts/pyinstaller -F ./CcdlSimpleStarter.py 

LICENSE

Unlicense License

ccdl's People

Contributors

bbplux avatar hulu-hulu avatar vircoys avatar zumgze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ccdl's Issues

comic-zenon 購買漫畫

url: https://comic-zenon.com/episode/3269754496759735052
下載失敗!
Traceback (most recent call last):
File "C:\Users\artsu\ccdl\CcdlSimpleStarter.py", line 93, in
reader.downloader()
File "C:\Users\artsu\AppData\Roaming\Python\Python311\site-packages\ccdl-0.2.15-py3.11.egg\ccdl\comic_action.py", line 201, in downloader
comic_json = self.get_comic_json(self._linkinfo, self._driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\artsu\AppData\Roaming\Python\Python311\site-packages\ccdl-0.2.15-py3.11.egg\ccdl\comic_action.py", line 140, in get_comic_json
for page in json_dataValue["readableProduct"]["pageStructure"]["pages"]:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

ichijin-plus.com下载报错,无法获取json

示例漫画章节链接:https://ichijin-plus.com/episodes/7969588101425
报错信息:
url: https://ichijin-plus.com/episodes/7969588101425
下載失敗!
Traceback (most recent call last):
File "CcdlSimpleStarter.py", line 93, in
reader.downloader()
File "C:\Users\lasthm\AppData\Local\Programs\Python\Python38\lib\site-packages\ccdl-0.2.13-py3.8.egg\ccdl\comic_action.py", line 201, in downloader
comic_json = self.get_comic_json(self._linkinfo, self._driver)
File "C:\Users\lasthm\AppData\Local\Programs\Python\Python38\lib\site-packages\ccdl-0.2.13-py3.8.egg\ccdl\comic_action.py", line 116, in get_comic_json
raise ValueError(json_url)
ValueError: https://api.ichijin-plus.com/episodes/7969588101425/begin_reading

Yanmanga not working

Returns this error:

Downloading:
Decoding:
Traceback (most recent call last):
  File "yanmanga.py", line 171, in <module>
    Yanmaga(linkinfo, webdriver.Chrome()).downloader()
  File "yanmanga.py", line 162, in downloader
    img = Image.open(BytesIO(imgs[urls[x]]))
  File "\PIL\Image.py", line 3009, in open
    "cannot identify image file %r" % (filename if filename else fp)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x00000278412BFAC8>

yanmanga下载失败

已更新到最新版本,使用普通下载模式和comici-viewer-id模式都失败,10.21晚上时能正常下载,10.22晚就不行了

信息如下:

url: https://yanmaga.jp/comics/%E8%BB%A2%E7%94%9F%E8%B2%B4%E6%97%8F%E3%81%AE%E4%B8%87%E8%83%BD%E9%96%8B%E6%8B%93%E6%8B%A1%E5%A4%A7%E7%B8%AE%E5%B0%8F%E3%82%B9%E3%82%AD%E3%83%AB%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%84%E3%81%9F%E3%82%89%E6%9C%80%E5%BC%B7%E9%A0%98%E5%9C%B0%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F/9cf6b510a9107ffe099bc75f1e7134e7
創建文件夾: ./漫畫/転生貴族の万能開拓~【拡大&縮小】スキルを使っていたら最強領地になりました~\第7話① ベルデナのおうち
下載失敗!
Traceback (most recent call last):
File "CcdlSimpleStarter.py", line 93, in
reader.downloader()
File "C:\Users\lasthm\AppData\Roaming\Python\Python38\site-packages\ccdl-0.2.6-py3.8.egg\ccdl\yanmaga.py", line 148, in downloader
urls, scrambles, sizes = self.get_content_info(view_id, page_to=page_count-1)
File "C:\Users\lasthm\AppData\Roaming\Python\Python38\site-packages\ccdl-0.2.6-py3.8.egg\ccdl\yanmaga.py", line 82, in get_content_info
for x in result:
TypeError: 'NoneType' object is not iterable

url: https://yanmaga.jp/
Please enter "comici-viewer-id": 841e79a05ba07abc8a4dcd8acf9cf20a

當前一話的文件夾 "./漫畫/転生貴族の万能開拓~【拡大&縮小】スキルを使っていたら最強領地になりました~\第7話① ベルデナのおうち" 存在,繼續運行數據將被覆蓋!
是否繼續運行?(y/n)
y
下載失敗!
Traceback (most recent call last):
File "CcdlSimpleStarter.py", line 93, in
reader.downloader()
File "C:\Users\lasthm\AppData\Roaming\Python\Python38\site-packages\ccdl-0.2.6-py3.8.egg\ccdl\yanmaga.py", line 148, in downloader
urls, scrambles, sizes = self.get_content_info(view_id, page_to=page_count-1)
File "C:\Users\lasthm\AppData\Roaming\Python\Python38\site-packages\ccdl-0.2.6-py3.8.egg\ccdl\yanmaga.py", line 82, in get_content_info
for x in result:
TypeError: 'NoneType' object is not iterable

comic-walker 采集失败

is:open label:bug

version

CcdlSimpleStarter_ccdl_0.1.12_dev

error


源碼: https://github.com/vircoys/ccdl

如需登入(含*)請提前在程式啟動的瀏覽器中登入,並加載目標url(任意標籤頁)!

DevTools listening on ws://127.0.0.1:58768/devtools/browser/9e4f67ed-815b-4e6b-9ae2-1abd9d74ba4c
[11140:2376:0708/141619.632:ERROR:device_event_log_impl.cc(214)] [14:16:19.632] USB: usb_device_handle_win.cc:1058 Failed to read descriptor from node connection: 连到系统上的设备没有发挥作用。 (0x1F)

輸入exit退出<<<<<<<<

url: https://comic-walker.com/viewer/?tw=2&dlcl=ja&cid=KDCW_KS12202346010001_68&bs=1
下載失敗!
Traceback (most recent call last):
File "CcdlSimpleStarter.py", line 59, in
File "ccdl\comic_walker.py", line 58, in downloader
IndexError: list index out of range

url: [11360:7420:0708/141819.607:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled


sunday webry

error report

源碼: https://github.com/oxdz/ccdl

如需登入(含*)請提前在程式啟動的瀏覽器中登入,並加載目標url(任意標籤頁)!

輸入exit退出<<<<<<<<

url: https://www.sunday-webry.com/episode/3269754496585663566
下載失敗!
Traceback (most recent call last):
File "CcdlSimpleStarter.py", line 93, in
File "ccdl\sunday_webry.py", line 46, in downloader
File "selenium\webdriver\remote\webdriver.py", line 636, in execute_script
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.JavascriptException: Message: javascript error: pages is not defined
(Session info: chrome=86.0.4240.75)

how can I do?

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.