-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/RipMeApp/ripme
- Loading branch information
Showing
4 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
Log = 日志 | ||
History = 历史 | ||
created = 创建时间 | ||
modified = 修改时间 | ||
queue = 队列 | ||
Configuration = 配置 | ||
open = 打开 | ||
|
||
# Keys for the Configuration menu | ||
current.version = 当前版本 | ||
check.for.updates = 检查更新 | ||
auto.update = 自动更新? | ||
max.download.threads = 最大下载线程数: | ||
timeout.mill = 超时(毫秒): | ||
retry.download.count = 重试下载次数 | ||
overwrite.existing.files = 覆盖现有文件? | ||
sound.when.rip.completes = 抓取完成时播放声音 | ||
preserve.order = 保持顺序 | ||
save.logs = 保存日志 | ||
notification.when.rip.starts = 通知抓取开始 | ||
save.urls.only = 仅保存 URL | ||
save.album.titles = 保存专辑标题 | ||
autorip.from.clipboard = 监视剪贴板上的 URL | ||
save.descriptions = 保存描述 | ||
prefer.mp4.over.gif = 首选 MP4 而非 GIF | ||
restore.window.position = 恢复窗口位置 | ||
remember.url.history = 记住 URL 历史 | ||
loading.history.from = 加载历史从 | ||
|
||
# Queue keys | ||
queue.remove.all = 移除全部 | ||
queue.validation = 您确定要移除队列内的全部项目? | ||
queue.remove.selected = 移除所选项目 | ||
|
||
# History | ||
re-rip.checked = 重新抓取选中的项目 | ||
remove = 移除 | ||
clear = 清除 | ||
history.check.all = 选中全部 | ||
history.check.none = 取消选中全部 | ||
history.check.selected = 选中所选项目 | ||
history.uncheck.selected = 取消选中所选项目 | ||
history.load.failed.warning = RipMe 加载位于 historyFile.getAbsolutePath() 的历史文件失败\n\n错误:%s\n\n关闭 RipMe 会自动覆盖此文件的内容,\n请在关闭 RipMe 前备份它! | ||
history.load.none = 无可重新抓取的历史条目。请先抓取一些专辑 | ||
history.load.none.checked = 未 '选中' 任何历史条目,请通过选中所需 URL 前面的复选框或URL 的右键菜单以选中所需条目 | ||
|
||
# TrayIcon | ||
tray.show = 显示 | ||
tray.hide = 隐藏 | ||
tray.autorip = 监视剪贴板上的 URL | ||
tray.exit = 退出 | ||
|
||
# Misc UI keys | ||
loading.history.from.configuration = 从配置加载历史 | ||
interrupted.while.waiting.to.rip.next.album = 等候抓取下一专辑期间发生中断 | ||
inactive = 非活动 | ||
download.url.list = 下载 URL 列表 | ||
select.save.dir = 选择保存目录 | ||
|
||
# Keys for the logs generated by DownloadFileThread | ||
nonretriable.status.code = 非可重试状态代码 | ||
retriable.status.code = 可重试状态代码 | ||
server.doesnt.support.resuming.downloads = 服务器不支持继续下载(续传) | ||
# A "magic number" can also be called a file signature | ||
was.unable.to.get.content.type.using.magic.number = 不能使用幻数获取内容类型 | ||
magic.number.was = 幻数为 | ||
deleting.existing.file = 删除现有文件 | ||
request.properties = 请求属性 | ||
download.interrupted = 下载中断 | ||
exceeded.maximum.retries = 超过最大重试次数 | ||
http.status.exception = HTTP 状态意外 | ||
exception.while.downloading.file = 下载文件时发生意外 | ||
failed.to.download = 下载失败 | ||
skipping = 跳过 | ||
file.already.exists = 文件已存在 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/com/rarchives/ripme/ripper/rippers/ReadcomicRipper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.rarchives.ripme.ripper.rippers; | ||
|
||
import java.io.IOException; | ||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.regex.Matcher; | ||
import java.util.regex.Pattern; | ||
|
||
import org.jsoup.nodes.Document; | ||
import org.jsoup.nodes.Element; | ||
|
||
import com.rarchives.ripme.ripper.AbstractHTMLRipper; | ||
import com.rarchives.ripme.utils.Http; | ||
|
||
public class ReadcomicRipper extends ViewcomicRipper { | ||
|
||
public ReadcomicRipper(URL url) throws IOException { | ||
super(url); | ||
} | ||
|
||
@Override | ||
public String getHost() { | ||
return "read-comic"; | ||
} | ||
|
||
@Override | ||
public String getDomain() { | ||
return "read-comic.com"; | ||
} | ||
|
||
|
||
|
||
@Override | ||
public String getGID(URL url) throws MalformedURLException { | ||
Pattern p = Pattern.compile("https?://read-comic.com/([a-zA-Z1-9_-]*)/?$"); | ||
Matcher m = p.matcher(url.toExternalForm()); | ||
if (m.matches()) { | ||
return m.group(1); | ||
} | ||
throw new MalformedURLException("Expected view-comic URL format: " + | ||
"read-comic.com/COMIC_NAME - got " + url + " instead"); | ||
} | ||
|
||
@Override | ||
public List<String> getURLsFromPage(Document doc) { | ||
List<String> result = new ArrayList<String>(); | ||
for (Element el : doc.select("div.pinbin-copy > a > img")) { | ||
result.add(el.attr("src")); | ||
} | ||
return result; | ||
} | ||
|
||
} |