mirror of
https://github.com/hansputera/tiktok-dl.git
synced 2026-04-05 19:51:57 +02:00
chore(provider): add handleException decorator
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {getFetch} from '..';
|
||||
import {handleException} from '../decorators';
|
||||
import {BaseProvider, ExtractedInfo} from './baseProvider';
|
||||
|
||||
/**
|
||||
@@ -18,6 +19,7 @@ export class DLTikProvider extends BaseProvider {
|
||||
*
|
||||
* @param {string} url - Video TikTok URL
|
||||
*/
|
||||
@handleException
|
||||
public async fetch(url: string): Promise<ExtractedInfo> {
|
||||
// getting verification token
|
||||
const response = await this.client('./');
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {getFetch} from '..';
|
||||
import {handleException} from '../decorators';
|
||||
import {BaseProvider, ExtractedInfo} from './baseProvider';
|
||||
import {keyGeneratorTTSave, matchLink} from './util';
|
||||
|
||||
@@ -20,6 +21,7 @@ export class TTSave extends BaseProvider {
|
||||
* @param {string} url - TikTok Video URL
|
||||
* @return {Promise<ExtractedInfo>}
|
||||
*/
|
||||
@handleException
|
||||
public async fetch(url: string): Promise<ExtractedInfo> {
|
||||
// getting token
|
||||
const response = await this.client('./');
|
||||
|
||||
Reference in New Issue
Block a user