I open bilibili and then use ctrol s to save all the resources of this webpage, but the local files have many extra suffixes?
Should I manually remove them one by one? The chrome browser I use
Is there any way to avoid or modify it, or is there a better way to download web resources?
大家讲道理2017-06-20 10:09:28
I wrote a code for your file to help you process it. First create a php file in your folder, put the following code in it and run it once. Please accept and like it, thank you.
<?php
$dir="./";
$file=scandir($dir);
for ($i=0; $i < count($file); $i++) {
if (strpos($file[$i], "@")) {
$arr = explode("@",$file[$i]);
rename($file[$i], $arr[0]);
}
if (strpos($file[$i], ".下载")) {
$arr = explode(".下载",$file[$i]);
rename($file[$i], $arr[0]);
}
}
?>
过去多啦不再A梦2017-06-20 10:09:28
This should be because someone has configured a resource server. If you remove it before downloading, the image will no longer be found in the path. It can only be processed after downloading. You can use batch processing to modify the downloaded file name