xuzhengyi1995 / Manga_downloader

A Manga download framework using selenium.
646 stars 58 forks source link

BW: Cannot read properties of undefined (reading 'menu') #57

Closed Ninoo-chan closed 3 years ago

Ninoo-chan commented 3 years ago

Before, I had the error Unable to locate element: {"method": "css selector", "selector": "[id =" pageSliderCounter "]"}. Several times I log out and cleared the cache and cookies to have a new one, but it continued the same. Then I turned it off my pc for a while, and when I came back I didn't have that error, but now I have this:

image

the error.png is always the book cover

mekozoko commented 3 years ago

Same problem

wlx1732 commented 3 years ago

same problem

xuzhengyi1995 commented 3 years ago

I think they have changed some thing in the js, in fact, I have a new idea to do this, we could change the chromium's rendering engine Blink's code, save the image buffer in the canvas.

BW use the steps below to draw the image on the screen:

  1. decrypt the data and draw the image on a canvas with it's original size.
  2. create a new canvas by the screen size.
  3. resize canvas in the first step and draw the image on the canvas above.

So, if we save the image on the first step, we should get a beautiful image with it's original size.

I tried a little, after modify and compile the code, I just open the manga in the customized browser without doing anything else and we could get the beautiful and clean image below:

913

So we got the original image with it original size (764*1200) and with out the barcode when browsing the manga normally, no need to set anything or check any image size any more.

But yes, modify and compile the chromium/Blink code is a very heavy thing for most people, maybe I will do something in the future if I have time.