We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dfe8723 commit c4c1c79Copy full SHA for c4c1c79
1 file changed
lib/routes/jable/index.ts
@@ -55,8 +55,14 @@ const GOT_HEADERS = {
55
async function handler(ctx) {
56
const { query } = ctx.req.param();
57
const encodedQuery = encodeURIComponent(query);
58
-
59
- const apiUrl = `https://jable.tv/search/${encodedQuery}/` + `?mode=async&function=get_block&block_id=list_videos_videos_list_search_result` + `&q=${encodedQuery}&sort_by=post_date`;
+ const params = new URLSearchParams({
+ mode: 'async',
60
+ function: 'get_block',
61
+ block_id: 'list_videos_videos_list_search_result',
62
+ q: encodedQuery,
63
+ sort_by: 'post_date',
64
+ });
65
+ const apiUrl = `https://jable.tv/search/${encodedQuery}/?${params.toString()}`;
66
67
const response = await got(apiUrl, { headers: GOT_HEADERS });
68
const $ = load(response.data);
0 commit comments