|
|
|
DMM and DLsite Book (.dmmb/.dlst) Image Ripper |
|
Oct 7 2012, 09:56
|
wocle
Lurker
Group: Lurkers
Posts: 1
Joined: 12-April 09
|
Turns out DLsite has their own version of the program DMM Viewer runs on, so this now works for .dlst files after a few minor changes. I've temporarily dubbed it the much less catchy ViewerRip. Also .jpg export has been added, as well as (hopefully) a few changes to make it more reliable. Download: [ mediafire.com] http://mediafire.com/download/c0g8zm44fitzceaView source (written in C): [ pastebin.com] http://pastebin.com/zpNccvwy (You'll still need FreeImage.dll from the download link if you want to be able to save as .jpg) Instructions 1. Place viewerrip.exe in the folder where you want the ripped files to be saved. 2. Run dmmviewer.exe or dlsiteviewer.exe 3. Open the file you want to rip with dmmviewer/dlsiteviewer. Enter your login information if necessary. 4. Run viewerrip.exe and wait for it to finish. It will run in the background, so you can use other programs while you wait. Known issues: The program will only rip from the first instance of dmmviewer/dlsiteviewer, so make sure you only have one open at a time. It may fail on small images. I don't know how small it would need to be exactly, so if you get garbage for any of your small images, let me know the dimensions. What do I do if it doesn't work? First, make sure you followed the instructions correctly and read the known issues. If your issue isn't resolved or addressed, run viewerrip_debug.bat (command line flag -d for those compiling from source with stdout and stderr piped to a file). Once it's done, open log.txt and send me the contents, as well as information about your version of Windows and anything else you feel might be relevant. Changelog 2013/08/04 - Added support for DLsite Viewer
- Added support for .jpg export
- Manually setting zoom to 100% is no longer necessary
- Fixed only exporting the first image if started while viewing the last image
- Possibly fixed "slanted" images
- Slightly more debugging information
2012/10/07 If you use it, let me know if it is/isn't successful so I can try to gauge how common problems are. This post has been edited by wocle: Aug 5 2013, 08:32
|
|
|
|
|
|
|
|
Apr 18 2019, 23:19
|
genl
Group: Members
Posts: 188
Joined: 17-January 11
|
QUOTE(BTK69 @ Apr 13 2019, 11:11) genl, can you throw out some emails. I can't PM since your box is full.
Solved for now. I can't guarantee it won't happen again. Here are 2 ways to let me know something is wrong in case my PM box is full: 1. I can be contacted through Tox, as described here. 2. You can reply in that thread I linked (not this thread) and I should get immediate notification.
--------------------
Answers to save your timeSpoiler text - Highlight to read... 5E2ADEA3D1B393BE11631AC96695E5540AC34F608AA76DB33BAD9C6D96BC806A68850F3A3EF1
|
|
|
|
|
|
May 14 2019, 19:40
|
vintag
Lurker
Group: Lurkers
Posts: 2
Joined: 28-January 17
|
QUOTE(genl @ Apr 19 2019, 00:19) Solved for now. I can't guarantee it won't happen again. Here are 2 ways to let me know something is wrong in case my PM box is full: 1. I can be contacted through Tox, as described here. 2. You can reply in that thread I linked (not this thread) and I should get immediate notification. Genl? I cannot senfd PM to you on forum
|
|
|
Jun 7 2019, 21:48
|
Nalien
Lurker
Group: Recruits
Posts: 9
Joined: 22-April 11
|
Just a correction in my guide since it seems I can't edit old posts: there's no need to zoom images, just download them without double clicking. (also, the line document.body.append(a) is redundant)
This post has been edited by Nalien: Jun 7 2019, 22:04
|
|
|
Jun 7 2019, 23:40
|
shinserph
Lurker
Group: Lurkers
Posts: 1
Joined: 23-April 10
|
QUOTE(Nalien @ Jun 7 2019, 22:48) Just a correction in my guide since it seems I can't edit old posts: there's no need to zoom images, just download them without double clicking. (also, the line document.body.append(a) is redundant)
Thanks man. You guide is super useful.
|
|
|
Jun 8 2019, 00:23
|
Nalien
Lurker
Group: Recruits
Posts: 9
Joined: 22-April 11
|
QUOTE(shinserph @ Jun 7 2019, 23:40) Thanks man. You guide is super useful.
I'm glad I could help .
|
|
|
Mar 3 2020, 18:06
|
Frederick888
Lurker
Group: Lurkers
Posts: 2
Joined: 30-June 13
|
Sorry for making a noise but could someone please share a copy of the old DLSite Viewer? I just tried the latest 1.4.0 and it didn't seem to work.
|
|
|
Mar 21 2020, 09:49
|
城夜未央
Newcomer
Group: Recruits
Posts: 10
Joined: 27-May 15
|
QUOTE(Frederick888 @ Mar 4 2020, 00:06) Sorry for making a noise but could someone please share a copy of the old DLSite Viewer? I just tried the latest 1.4.0 and it didn't seem to work.
Hi, I uploaded an old dlsite viewer, and remember to close the update prompt window. Download: [ www.mediafire.com] http://www.mediafire.com/file/zehr14zvazic...erPack.exe/fileThis post has been edited by 城夜未央: Mar 21 2020, 09:51
|
|
|
|
|
|
Mar 21 2020, 15:11
|
Nalien
Lurker
Group: Recruits
Posts: 9
Joined: 22-April 11
|
Here is an updated version of my guide to save images from DMM's browser viewer, which is useful for .dmme files with which viewerrip doesn't work. Start Chrome with the --disable-web-security flag and with a different user. In Windows you can do this by pressing Win+R and executing CODE "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir=C:\chromeuser https://book.dmm.com/library/?age_limit=all&expired=1 Set your desired download folder in Chrome's settings. Find the work you want to save in your library, open the DevTools with F12 or Ctrl+Shift+I and select the Network tab (if you don't do this beforehand it may ask you to refresh the page). Start reading. Click one of the 0.jpeg in the DevTools (you can click Img near the top to filter the images) to show the original image dimensions below the image preview. With the DevTools still focused, press Ctrl+Shift+M to enable device mode. Open the device mode advanced options by clicking the vertical ellipsis in the top right and click Add device pixel ratio. Click DPR at the top and set it to 1. Set the size of the viewport to that of the original images by changing the values of the numerical inputs at the top center. This will make the images you download of the same dimensions as the originals. Open the Console tab of the DevTools, copy paste the following code to download the images as jpeg and press enter. CODE filename = 1 a = document.createElement('a')
function downloadCanvas() { a.href = document.querySelector('.currentScreen > canvas').toDataURL('image/jpeg') a.download = filename++ a.click() }
downloadCanvas() Or this to download the images as webp, which have smaller file size. CODE filename = 1 a = document.createElement('a')
function downloadCanvas() { a.href = document.querySelector('.currentScreen > canvas').toDataURL('image/webp') a.download = filename++ a.click() }
downloadCanvas() Set the viewport height again if it has been decreased by the newly appeared download bar. Go to the next image and execute CODE downloadCanvas() in the console and repeat. When there is a two-page spread, temporarily double the viewport width. You can focus the DevTools with F6, but if you just changed the viewport width you have to click the console to focus it again. To save the images quickly I suggest placing the cursor on the left side of the viewport and repeating the following actions: Click F6 Up Enter You may want to enable mouse keys to click with Numpad 5. When you save the wrong image, delete it and execute CODE --filename in the console to decrement the next filename by one.
|
|
|
|
|
|
Mar 25 2020, 13:22
|
Frederick888
Lurker
Group: Lurkers
Posts: 2
Joined: 30-June 13
|
Thank you guys for the help! I've successfully ripped the book
|
|
|
|
|
|
Apr 21 2020, 14:34
|
genl
Group: Members
Posts: 188
Joined: 17-January 11
|
Note about browser viewers where scrambled images are used (DMM is one of those too):
- Same as screen capturing, after you dump image data one way or another, you basically end up with screenshots. If you save them as JPEG you lose even more of the quality. If you save them as PNG you keep 100% of the quality but must sacrifice disk space. Use PNGGauntlet to compress them as much as possible.
- Scrambled images are JPEG files, which means there are additional artifacts if you compare it with downloadable files. In case with DMM, DMMB/DMME contain unscrambled images of original quality, while browser viewer version contain less quality because of the scrambling. This means if you screen capture pages from DMMB/DMME at the right zoom/resolution, you'll end up with 100% quality images. Better quality when compared to scrambled images in browser viewer. Albeit you'll still have to choose between less quality JPEG and oversized PNG.
DMM used to provide actual 100% quality through the browser viewer before they started to use scrambling (few years ago).
--------------------
Answers to save your timeSpoiler text - Highlight to read... 5E2ADEA3D1B393BE11631AC96695E5540AC34F608AA76DB33BAD9C6D96BC806A68850F3A3EF1
|
|
|
|
|
|
Jun 17 2020, 04:37
|
zxc102635
Lurker
Group: Lurkers
Posts: 1
Joined: 6-August 18
|
DLsite Viewer Default magnification is auto. viewerrip(Manually setting zoom to 100% is no longer necessary)is too large.
|
|
|
|
|
|
Jun 18 2020, 00:55
|
dragontamer8740
Group: Members
Posts: 4,402
Joined: 22-August 12
|
QUOTE(genl @ Apr 21 2020, 08:34) Use PNGGauntlet to compress them as much as possible.
Or pngcrush. Have a wrapper script, too. (remove '-brute' for much faster times but possibly worse compression) Note that as it's currently written if pngcrush dies with a bad return code the script will not process any additional images after the one that made it fail. Yes, I know it's ugly. I wrote it at 2 AM on a Wednesday for compressing high resolution uncompressed PNG files someone uploaded. CODE #! /usr/bin/env sh
# pngcrush-replace: # run pngcrush on an image, and if the resulting PNG image is smaller, replace # the original with it. Tries to handle program failures & empty outputs # gracefully (e.g., not replacing the original with an empty image).
# This version also can remove colorspace information since pngcrush with # new-ish libpng (from the last year or so) likes to quit with failure # on images with 'known bad sRGB profiles.' To do so, add # '-rem allb' to the pngcrush arguments below in the script.
# usage: pngcrush-replace <list of filenames>
# Depends on the following non-POSIX programs: # - mktemp (can replace with just a 'touch' probably) # - dc (for calculating file sizes in megabytes (actually MiB) # (could be replaced with 'bc' if you so desire, but 'dc' is in busybox # and 'bc' isn't, and also I prefer RPN calculators.) # - pngcrush (duh)
TMPFILE="$(mktemp -t 'crush_XXXXXX.png')"
cleanupfunc() # catch ^C and similar and delete temp files before exiting { if [ -e "$TMPFILE" ]; then rm "$TMPFILE" fi exit 0 } trap cleanupfunc HUP INT QUIT ABRT TERM TOTAL_COUNT="$#" CUR=1 while [ "$#" -gt 0 ]; do # clear old temp file from last loop so 'file' command is accurate for sure printf '' > "$TMPFILE" echo 'Crushing '"$1"'… ('"$CUR"' of '"$TOTAL_COUNT"')' OLDSIZE="$(wc -c < "$1")" # old size in bytes # pngcrush -rem allb -reduce "$1" "$TMPFILE" pngcrush -brute "$1" "$TMPFILE" RETCODE="$?" if [ "$RETCODE" -eq 0 ]; then NEWSIZE="$(wc -c < "$TMPFILE")" if [ "$NEWSIZE" -lt "$OLDSIZE" ]; then # make sure it's a valid PNG file (not empty or something at least) file "$TMPFILE" | grep -q 'PNG image' if [ "$?" -eq 0 ]; then # replace original image and print out the size difference in MiB cat "$TMPFILE" > "$1" # don't change file permissions like cp would echo "$(echo '2k '"$OLDSIZE"' 1048576 / p' | dc)"'MiB -> '"$(echo '2k '"$NEWSIZE"' 1048576 / p' | dc)"'MiB' else 1>&2 echo 'pngcrush failed to make a valid result from '"$1"'.' fi else 1>&2 echo 'pngcrush failed to reduce the size of '"$1"'.' 1>&2 echo 'Not overwriting.' # print size comparison in MiB 1>&2 echo '('"$(echo '2k '"$OLDSIZE"' 1048576 / p' | dc)"'MiB -> '"$(echo '2k '"$NEWSIZE"' 1048576 / p' | dc)"'MiB)' fi else 1>&2 echo 'Error: pngcrush exited with status: '"$RETCODE" 1>&2 echo 'While processing file: '"$1" 1>&2 echo 'Cleaning up and exiting without replacing the original.' cleanupfunc fi shift 1 CUR="$(expr "$CUR" '+' '1')" done # remove trap for ^C and other signals that would kill the program trap - HUP INT QUIT ABRT TERM # run cleanup (delete temp files) cleanupfunc Also, have a patch to pngcrush's sources that make it work despite modern libpng "iCCP: known incorrect sRGB profile" warnings (Photoshop sometimes likes to make bad PNG's like this). CODE diff --git a/Makefile b/Makefile index 79e12a9..e1400a5 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ RM = rm -f CPPFLAGS = -I $(PNGINC) -CFLAGS = -g -O3 -fomit-frame-pointer -Wall +CFLAGS = -g -O3 -fomit-frame-pointer -Wall -DPNG_IGNORE_SRGB_ICCP_HACK=1 # [note that -Wall is a gcc-specific compilation flag ("all warnings on")] LDFLAGS = O = .o diff --git a/pngcrush.c b/pngcrush.c index d0c387e..e449788 100644 --- a/pngcrush.c +++ b/pngcrush.c @@ -5527,6 +5527,12 @@ int main(int argc, char *argv[]) } #endif +#ifdef PNG_IGNORE_SRGB_ICCP_HACK + /* hack */ + png_set_option(read_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON); + png_set_option(write_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON); +#endif + #ifndef PNGCRUSH_CHECK_ADLER32 # ifdef PNG_IGNORE_ADLER32 if (last_trial == 0) patch with `patch -p1 < patch-filename.patch` QUOTE(genl @ Apr 21 2020, 08:34) In case with DMM, DMMB/DMME contain unscrambled images of original quality, while browser viewer version contain less quality because of the scrambling. This means if you screen capture pages from DMMB/DMME at the right zoom/resolution, you'll end up with 100% quality images. Better quality when compared to scrambled images in browser viewer. Albeit you'll still have to choose between less quality JPEG and oversized PNG.
If the original files were not lossless, yes, the PNG is larger. If the original files are lossless, PNG should not be significantly larger (if at all). QUOTE(genl @ Apr 21 2020, 08:34) DMM used to provide actual 100% quality through the browser viewer before they started to use scrambling (few years ago).
That's a shame. This post has been edited by dragontamer8740: Jun 18 2020, 01:32
--------------------
|
|
|
|
|
|
Jun 19 2020, 17:35
|
ilwaz
Group: Members
Posts: 168
Joined: 3-January 12
|
QUOTE(dragontamer8740 @ Jun 17 2020, 18:55) Or pngcrush.
Use zopflipng with "-m" instead of pngcrush with "-brute", it compresses pngs more, and is faster to boot. Souce is my thread on lossless compressionThis post has been edited by ilwaz: Jun 19 2020, 17:35
|
|
|
|
|
|
Jun 19 2020, 23:49
|
dragontamer8740
Group: Members
Posts: 4,402
Joined: 22-August 12
|
QUOTE(ilwaz @ Jun 19 2020, 11:35) Use zopflipng with "-m" instead of pngcrush with "-brute", it compresses pngs more, and is faster to boot. Souce is my thread on lossless compressionFour year old post is four years old (spreadsheet's from 2016). But I'll still make a wrapper for it as well. It appears to be a bit better. Still, that feeling when a program doesn't give a shit about 80 column line breaking conventions for its help text and also doesn't break on words. I tinkered with it a little, it's not perfect but far more legible for me now. Also, it did compress this png smaller than pngcrush did, so it has that going for it. This post has been edited by dragontamer8740: Jun 20 2020, 00:28
--------------------
|
|
|
|
|
|
Jun 20 2020, 02:30
|
ilwaz
Group: Members
Posts: 168
Joined: 3-January 12
|
QUOTE(dragontamer8740 @ Jun 19 2020, 17:49) Four year old post is four years old (spreadsheet's from 2016). But I'll still make a wrapper for it as well. It appears to be a bit better.
It's old, but not yet outdated. There hasn't been much development in png optimizers. I am actually updating the data though, there have been some cool new formats for lossless images. QUOTE(dragontamer8740 @ Jun 19 2020, 17:49) Still, that feeling when a program doesn't give a shit about 80 column line breaking conventions for its help text and also doesn't break on words. I tinkered with it a little, it's not perfect but far more legible for me now. Also, it did compress this png smaller than pngcrush did, so it has that going for it. You might benefit from running multiple processes in parallel, if you're working on your script. Newer image format encoders are multithreaded but png optimizers generally are not.
|
|
|
|
|
|
Jun 20 2020, 03:39
|
dragontamer8740
Group: Members
Posts: 4,402
Joined: 22-August 12
|
QUOTE(ilwaz @ Jun 19 2020, 20:30) You might benefit from running multiple processes in parallel, if you're working on your script. Newer image format encoders are multithreaded but png optimizers generally are not.
My computers aren't very heavily threaded either One's got two cores and the other four. I do most of this stuff on the two core one because it's more portable (it's an old laptop). That said, maybe. Bourne shells start to show deficiencies when you start threading stuff though. Edit: zopflipng took 14 minutes on a 4000x4000 image on my two core 2.13GHz machine and ~12 on my four core 3GHz one (which I started a few minutes after the laptop). Yeesh. Shaved 2.5MB or so off the originally 17MB image though. I have another version of the script which just runs them through convert with default parameters (useful for uncompressed PNG's). Much faster than that. This post has been edited by dragontamer8740: Jun 20 2020, 04:48
--------------------
|
|
|
|
|
|
Jun 20 2020, 20:55
|
xTtotal
Lurker
Group: Recruits
Posts: 4
Joined: 24-February 12
|
no idea whether or not people in here are aware but at DMM there seems to be a big difference between Doujin and book DRM. in the browser you can download all the JPGs of "DRM'ed" Dojins which have no scrambling and seem full size, with a little bit of manual work opening and saving them from the network subtab (tested recently using firefox on linux) which is just plain great. did it with this one. [ www.dmm.co.jp] https://www.dmm.co.jp/dc/doujin/-/detail/=/cid=d_173243/no need to potentially sacrifice quality or whatever by scraping canvases when the file is just lying around on the server (provided you bring cookies) QUOTE(城夜未央 @ Mar 21 2020, 08:49) Hi, I uploaded an old dlsite viewer, and remember to close the update prompt window. Download: [ www.mediafire.com] http://www.mediafire.com/file/zehr14zvazic...erPack.exe/filelivesaver. I was always afraid to buy DRM'ed stuff because well the items could just go away either because DLsite/DMM or the artist removes them or go out of business or for reasons that are entirely not the fault of DLSite/DMM, and I wouldnt want that. This post has been edited by xTtotal: Jun 20 2020, 21:03
|
|
|
|
|
|
Jul 12 2020, 06:20
|
xTtotal
Lurker
Group: Recruits
Posts: 4
Joined: 24-February 12
|
QUOTE(Pillowgirl @ May 14 2018, 14:04) QUOTE(sureok1 @ May 14 2018, 04:40) Has anyone developed a method of ripping .dmme files that doesn't involve giving out your credentials to someone else over the internet?
Yes. details please?
|
|
|
Aug 23 2020, 03:49
|
joey86
Newcomer
Group: Recruits
Posts: 13
Joined: 20-July 10
|
Is there any solution for EPUB files from DMM guys? I can easily rip anything from dmmb format, but it I doesn't work with Epub ������
This post has been edited by joey86: Aug 23 2020, 03:50
|
|
|
|
|
|
Oct 4 2020, 02:48
|
spyps
Lurker
Group: Lurkers
Posts: 1
Joined: 30-November 13
|
QUOTE(Nalien @ Mar 21 2020, 05:11) Here is an updated version of my guide to save images from DMM's browser viewer, which is useful for .dmme files with which viewerrip doesn't work. Start Chrome with the --disable-web-security flag and with a different user. In Windows you can do this by pressing Win+R and executing CODE "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir=C:\chromeuser https://book.dmm.com/library/?age_limit=all&expired=1 Set your desired download folder in Chrome's settings. Find the work you want to save in your library, open the DevTools with F12 or Ctrl+Shift+I and select the Network tab (if you don't do this beforehand it may ask you to refresh the page). Start reading. Click one of the 0.jpeg in the DevTools (you can click Img near the top to filter the images) to show the original image dimensions below the image preview. With the DevTools still focused, press Ctrl+Shift+M to enable device mode. Open the device mode advanced options by clicking the vertical ellipsis in the top right and click Add device pixel ratio. Click DPR at the top and set it to 1. Set the size of the viewport to that of the original images by changing the values of the numerical inputs at the top center. This will make the images you download of the same dimensions as the originals. Open the Console tab of the DevTools, copy paste the following code to download the images as jpeg and press enter. CODE filename = 1 a = document.createElement('a')
function downloadCanvas() { a.href = document.querySelector('.currentScreen > canvas').toDataURL('image/jpeg') a.download = filename++ a.click() }
downloadCanvas() Or this to download the images as webp, which have smaller file size. CODE filename = 1 a = document.createElement('a')
function downloadCanvas() { a.href = document.querySelector('.currentScreen > canvas').toDataURL('image/webp') a.download = filename++ a.click() }
downloadCanvas() Set the viewport height again if it has been decreased by the newly appeared download bar. Go to the next image and execute CODE downloadCanvas() in the console and repeat. When there is a two-page spread, temporarily double the viewport width. You can focus the DevTools with F6, but if you just changed the viewport width you have to click the console to focus it again. To save the images quickly I suggest placing the cursor on the left side of the viewport and repeating the following actions: Click F6 Up Enter You may want to enable mouse keys to click with Numpad 5. When you save the wrong image, delete it and execute CODE --filename in the console to decrement the next filename by one. I tried this method with [ www.dlsite.com] https://www.dlsite.com/books/work/=/product_id/BJ255317.html, but it didn't work. I got error message "Cannot read property 'toDataURL' of null"I
|
|
|
|
|
|
1 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
|
|
|
|
|