GithubHelp home page GithubHelp logo

galgamer-org / eh-pdf Goto Github PK

View Code? Open in Web Editor NEW
43.0 1.0 3.0 78 KB

將一個 E-Hentai 畫廊下載並轉換成 PDF,方便在 Kindle 上閱讀 以及在 iPad 上閱讀並作筆記,,,

Python 100.00%
crawler e-hentai pdf

eh-pdf's Introduction

EH-PDF

將一個 E-Hentai 畫廊下載並轉換成 PDF,方便在 Kindle 上閱讀 以及在 iPad 上閱讀並作筆記,,,

Download manga from E-Hentai and export to PDF, for Kindle and iPad!

特色

ehpdf2.mp4
  • 支持將 E-Hentai 和 ExHentai 轉換成 PDF!
  • 支持登入加載和不登入加載(登入可以享受到你的帳號的特權,比如說加載大圖)
  • 多線程同時加載(很快!開得越多越快,默認 12 線程)
  • 將彩色頁面轉換成灰度並提高對比度(方便 Kindle 閱讀!)
  • 將頁面縮放到指定的尺寸(節約空間!)
  • 支持斷點續傳!下載失敗時,直接重新原地運行一遍,程序會從中斷的地方自動重啓
  • ...

安裝方法

免安裝學習版

https://github.com/Yamabuki-bakery/EH-PDF/releases

提供 64 位 Windows 和 Linux 版

Python 版

你的電腦需要安裝 Python 3.8 以上版本才能運行。

克隆這個倉庫(或者 🔗下載壓縮包):

git clone https://github.com/Yamabuki-bakery/EH-PDF
cd EH-PDF

安裝依賴庫:asyncio, aiohttp, pillow

pip3 install -r requirements.txt

...然後運行

python3 eh-pdf.py --help

使用方法

一鍵下載 https://exhentai.org/g/2339054/da04b84080/ 的畫廊爲 PDF:

python3 eh-pdf.py https://exhentai.org/g/2339054/da04b84080/

如果網絡中斷導致下載失敗,則把原命令再原樣運行一次即可,程序會在失敗的地方繼續運行,,,

參數說明:

  • -g 輸出 PDF 文件,否則僅下載圖片
  • -g 輸出灰度圖像 PDF,方便 Kindle 觀看並節省文件大小
  • -x <像素> 限制圖像的寬度
  • -y <像素> 限制圖像的高度
  • -c <文件路徑> 你的 E-Hentai 登入 cookies,不指定默認讀取當前目錄 cookies.json
  • -o <文件路徑> 輸出 PDF 的文件,不指定默認在當前目錄下以本子標題生成一個 PDF
  • -d 在 log 上輸出羅嗦信息
  • -j <數量> 下載線程數,不指定就默認 32

命令行返回值

  • 0: 成功
  • 1: 網路故障
  • 其他:其他故障

eh-pdf's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

eh-pdf's Issues

exhentai error

when using exhentai.org:

  File "/Users//Git/EH-PDF/eh-pdf.py", line 58, in main
    await target_gallery.get_each_page_link()
  File "/Users//Git/EH-PDF/eh-pdf.py", line 336, in get_each_page_link
    assert len(urls) == self.page_count
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

but e-hentai.org works.

edit : 检查 cookie 后 ex 可以了但 eh 不行力

EH-PDF % python3 eh-pdf.py -g https://e-hentai.org/g/1137247/bc3e1c69e1/
2024-03-21 00:08:03 [INFO] [check_cookies] Loading cookies.json
2024-03-21 00:08:03 [INFO] 正在收集數據,,,
2024-03-21 00:08:03 [INFO] [get_metadata] 正在跳過...
2024-03-21 00:08:03 [ERROR] [get_thumb_page_count] 無法打開畫廊連結!!

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.