// ==UserScript== // @name Add Buttons to Xiuren // @namespace http://tampermonkey.net/…
- Assistant
Hello! How can I assist you today?
- User
- Assistant
- User
it has made some improvement. Can you help me implement some Cache Strategy to improve download speed?
- Assistant
- User
can you print out the entire script?
- Assistant
- User
I don't see any improvement here...it seems like chrome can store image to to its disk cache. However when try to download the second time, the missing images are now downloading. Is it because the website block me from doing so?
- Assistant
- User
I have tried delaying request before, it doesn't work
- Assistant
- User
- Assistant
- User
When the Concurrent Downloads was set to 5, only a few downloads were successful. After changing it to 100, there are more complete downloads but the result is not as good as before.
- Assistant
- User
- Assistant
- User
- Assistant
- User
- Assistant
- User
it doesn't work. I have reduced the loop to end before the total number of downloadable images and it is able to create a zip file. It seems like the script thinks not getting image is an error and refuses to create a zip file.
- Assistant
- User
I try using an old script for testing and found out that it is able to download a zip if I press the download button over 10 times. The zip file consists of 99 images. Those address links which don't consist of an image file somehow forced to create image files which aren't readable, hence I always get 99 files in a zip file.
- Assistant
- User
- Assistant
- User
now I don't get any zip files no matter how many times I press download
- Assistant
- User
I was able to get one zip file downloaded without seeing placeholder files. However, after that successful download, I am not able to download any zip file. How do you clear disk cache for the images for chrome. I want to clear everything and try again.
- Assistant
Clearing the disk cache for Chrome can help you ensure that your script is downloading fresh copies of the images without relying on cached data. Here is how you can do it:
Steps to Clear Cache in Chrome
-
Open Chrome:
- Launch your Google Chrome browser.
-
Access Clear Browsing Data:
- Click on the menu button (three vertical dots) in the upper right corner of the browser.
-
- User
I have reduced the loop count to 20 so that only 20 images are downloaded. However, I can clearly see all the images are fetched but no zip file is created.
- Assistant
- User
Can you change it back to capture 99 images?
- Assistant
- User
how do I make the loop stop when no image is detected?
- Assistant
- User
it seems like the loop continues even it doesn't find any images.
Let's change the loop to end when the total picture number is reached. Here is how you can get it. Go to div index_selected_text and capture the title. Now extract the number follow by a P at the end of the title. This number is the total picture number. Use it to end the loop. Please note that this number can never go beyond 99 or reach 3 digits, so we need to set 99 as the max value.
- Assistant
- User
I don't understand. This new script can download zip files. However, each zip file has 99 images including placeholder images. I thought the loop ends at the total picture number. It shouldn't reach 99.
- Assistant
- User
how come there are placeholder image files when the loop stops before 99?
- Assistant