test: add some testing and prototype
このコミットが含まれているのは:
コミット
ce45eea025
|
@ -0,0 +1,9 @@
|
|||
export default {
|
||||
PORNHUB: "https://www.pornhub.com",
|
||||
XNXX: "https://www.xnxx.com",
|
||||
REDTUBE: "https://www.redtube.com",
|
||||
XVIDEOS: "https://www.xvideos.com",
|
||||
XHAMSTER: "https://xheve2.com",
|
||||
YOUPORN: "https://www.youporn.com",
|
||||
JAVHD: "https://javhd.today"
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
import c from "../src/utils/options";
|
||||
import p from "phin";
|
||||
|
||||
for (const url of
|
||||
[c.PORNHUB, c.XNXX, c.REDTUBE, c.XVIDEOS, c.XHAMSTER, c.YOUPORN]) {
|
||||
p({ url }).then(res => {
|
||||
if (res.statusCode !== 200) {
|
||||
console.log(`${url} is not available, status code: ${res.statusCode}, check the sites or your own user-agent`);
|
||||
}
|
||||
else {
|
||||
console.log(`${url} is available, can be scraped`);
|
||||
}
|
||||
});
|
||||
}
|
読み込み中…
新しいイシューから参照