fixed seafile url
This commit is contained in:
		@@ -13,6 +13,10 @@ for(let i=0; i<process.argv.length; i++) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(url !== null) {
 | 
					if(url !== null) {
 | 
				
			||||||
 | 
					    const search = new URLSearchParams();
 | 
				
			||||||
 | 
					    search.set("dl", "1");
 | 
				
			||||||
 | 
					    const direct = new URL(url);
 | 
				
			||||||
 | 
					    direct.search = search.toString();
 | 
				
			||||||
    axios.get(url).then((resp) => {
 | 
					    axios.get(url).then((resp) => {
 | 
				
			||||||
        const dom = cheerio.load(resp.data, {xmlMode: false});
 | 
					        const dom = cheerio.load(resp.data, {xmlMode: false});
 | 
				
			||||||
        const tags = dom('script').get();
 | 
					        const tags = dom('script').get();
 | 
				
			||||||
@@ -53,6 +57,7 @@ if(url !== null) {
 | 
				
			|||||||
                data[prop.key.name] = prop.value.value;
 | 
					                data[prop.key.name] = prop.value.value;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        data["rawPath"] = direct.href;
 | 
				
			||||||
        console.log(JSON.stringify(data));
 | 
					        console.log(JSON.stringify(data));
 | 
				
			||||||
    })
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user