fix(packages.core#savetikProvider): remove match-token regex

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Hanif Dwy Putra S
2022-05-22 12:35:28 +00:00
committed by GitHub
parent 34cfc0da7f
commit dc4cc60f1e

View File

@@ -25,15 +25,9 @@ export class SaveTikProvider extends BaseProvider {
*/
async fetch(url: string): Promise<ExtractedInfo> {
const response = await this.client('./');
const token = (
response.body.match(/id="token" value="([^""]+)"/) as string[]
)[1];
const responseAction = await this.client.post('./action.php', {
form: {
url: url,
token: token,
},
headers: {
cookie: response.headers['set-cookie']?.toString(),