Skip to content

Commit

Permalink
feat: add new wallpaper site
Browse files Browse the repository at this point in the history
  • Loading branch information
iseizuu committed Sep 6, 2023
1 parent e3c96b7 commit 0c70de6
Show file tree
Hide file tree
Showing 12 changed files with 714 additions and 227 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Get Anime wallpapers based on scrapping from websites.
* [4K Wallpapers](https://free4kwallpapers.com/)
* [Wall Haven](https://wallhaven.cc)
* [ZeroChan](https://www.zerochan.net)
* [Wallpapers.com](https://wallapapers.com)
<br>

[![Version](https://nodei.co/npm/anime-wallpaper.png?compact=true)](https://nodei.co/npm/anime-wallpaper)
Expand Down Expand Up @@ -44,6 +45,12 @@ const wallpaper = await wallpaper.random();
const wallpaper = await wallpaper.search({ title: "Misaka Mikoto" }, AnimeSource.WallHaven);
```

- Getting Wallpaper from [Wallpapers.com](https://wallpapers.com) <img align="center" width="15" src="https://cdn.discordapp.com/emojis/735119429016485920.webp?size=128&quality=lossless">

```js
const wallpaper = await wallpaper.search({ title: "Keqing" }, AnimeSource.Wallpapers);
```

- Getting Wallpaper from [ZeroChan](https://www.zerochan.net) <img align="center" width="15" src="https://cdn.discordapp.com/emojis/735119429016485920.webp?size=128&quality=lossless">

```js
Expand Down
1 change: 1 addition & 0 deletions dist/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"free4kWallpaper": "https://free4kwallpapers.com",
"wallHaven": "https://wallhaven.cc",
"zerochan": "https://www.zerochan.net",
"wallpapers": "https://wallpapers.com",
"type": {
"sfw": "100",
"sketchy": "010",
Expand Down
25 changes: 12 additions & 13 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { dataImageFormat, searchOpt } from "./typings";
export declare enum AnimeSource {
WallHaven = 2,
ZeroChan = 3
ZeroChan = 3,
Wallpapers = 4
}
export declare class AnimeWallpaper {
constructor();
Expand Down Expand Up @@ -31,7 +32,14 @@ export declare class AnimeWallpaper {
*
* @returns {dataImageFormat}
*/
private scrapeFrom4kWallpaper;
scrapeFrom4kWallpaper(): Promise<dataImageFormat[]>;
/**
* Scraping images wallpaper from Wallpapers.com
*
* @param search.title the title of the anime you want to search.
* @returns {dataImageFormat}
*/
scrapeFromWallpapersDotCom(search: searchOpt): Promise<dataImageFormat[]>;
/**
* Scraping images wallpaper from WallHaven
*
Expand All @@ -40,22 +48,13 @@ export declare class AnimeWallpaper {
* @param search.page the page for image you want to search, default is 1
* @returns {dataImageFormat}
*/
private scrapeFromWallHaven;
scrapeFromWallHaven(search: searchOpt): Promise<dataImageFormat[]>;
/**
<<<<<<< Updated upstream
* Scraping images wallpaper from zerochan
*
* @param search.title the title of anime that you want to search.
* @returns {dataImageFormat}
*/
private scrapeFromZeroChan;
=======
* Scraping images wallpaper from zerochan
*
* @param title the title of anime that you want to search.
* @returns {dataImageFormat2}
*/
getAnimeWall5(title: string): Promise<dataImageFormat1[]>;
>>>>>>> Stashed changes
scrapeFromZeroChan(search: searchOpt): Promise<dataImageFormat[]>;
private _request;
}
132 changes: 40 additions & 92 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0c70de6

Please sign in to comment.