Skip to content

Commit

Permalink
test: add some testing and prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkaroid committed Apr 18, 2023
1 parent 23e8b57 commit ce45eea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/utils/options.ts
Original file line number Diff line number Diff line change
@@ -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"
};
14 changes: 14 additions & 0 deletions test/test.ts
Original file line number Diff line number Diff line change
@@ -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`);
}
});
}

0 comments on commit ce45eea

Please sign in to comment.