forked from viniciusgdr/imagemaker.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
29 lines (28 loc) · 1.58 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { TextPro } from "./src/textprome";
import { Ephoto360 } from "./src/ephoto360";
import { PhotoOxy } from "./src/photooxy";
import { IGenerateNewCookies, IMaker } from "./src";
export class Maker {
private generateNewCookies(): IGenerateNewCookies {
let getDate = String(Date.now()).slice(0, 10)
return {
textpro: {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.36',
'cookie': `_ga=GA1.2.1174806771.${getDate}; _gid=GA1.2.1118436800.${getDate}; PHPSESSID=b55cbog2pn77j0cbguaqq33ou2`
},
ephoto: {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.36',
'cookie': `_gid=GA1.2.694836508.${getDate}; __gads=ID=e77077076c5a18dc-223769e4b3cf00de:T=${getDate}:RT=${getDate}:S=ALNI_MZ54A8a-CdUL0GH7R1OPfiwplOIyQ; PHPSESSID=1b2hk17njmimvuim3celdji3q3; _ga=GA1.1.170505887.${getDate}; _ga_SK0KDDQM5P=GS1.1.${getDate}.2.1.${getDate}.0`,
}
}
}
public async TextPro(url: string, text: string[]): Promise<IMaker> {
return await TextPro(url, text, this.generateNewCookies())
}
public async Ephoto360(url: string, text: string[]): Promise<IMaker> {
return await Ephoto360(url, text, this.generateNewCookies())
}
public async PhotoOxy(url: string, text: string[]): Promise<IMaker> {
return await PhotoOxy(url, text, this.generateNewCookies())
}
};