diff --git a/README.md b/README.md index 42f5d20..54d9123 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Code might be a little messy, but I do my best to improve it with every commit. ### npm modules - cors - dotenv +- esbuild - express - express-rate-limit - ffmpeg-static diff --git a/src/config.json b/src/config.json index b2a1c75..4b0885b 100644 --- a/src/config.json +++ b/src/config.json @@ -2,7 +2,6 @@ "streamLifespan": 1800000, "maxVideoDuration": 1920000, "genericUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", - "mobileUserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1", "authorInfo": { "name": "wukko", "link": "https://wukko.me/", diff --git a/src/modules/config.js b/src/modules/config.js index 34e3acf..da7f708 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -9,7 +9,6 @@ version = packageJson.version, streamLifespan = config.streamLifespan, maxVideoDuration = config.maxVideoDuration, genericUserAgent = config.genericUserAgent, -mobileUserAgent = config.mobileUserAgent, repo = packageJson["bugs"]["url"].replace('/issues', ''), authorInfo = config.authorInfo, supportedLanguages = config.supportedLanguages, diff --git a/src/modules/services/douyin.js b/src/modules/services/douyin.js index 3e45ad6..e3224eb 100644 --- a/src/modules/services/douyin.js +++ b/src/modules/services/douyin.js @@ -1,6 +1,6 @@ import got from "got"; import loc from "../../localization/manager.js"; -import { genericUserAgent, mobileUserAgent } from "../config.js"; +import { genericUserAgent } from "../config.js"; export default async function(obj) { try { @@ -17,7 +17,7 @@ export default async function(obj) { } let iteminfo = await got.get(`https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=${obj.postId}`, {headers: { 'authority': 'www.iesdouyin.com', - 'user-agent': mobileUserAgent, + 'user-agent': genericUserAgent, 'content-type': 'application/x-www-form-urlencoded', 'accept': '*/*', 'referer': `https://www.iesdouyin.com/share/video/${obj.postId}/?region=CN&u_code=15b9142gf&titleType=title&utm_source=copy_link&utm_campaign=client_share&utm_medium=android&app=aweme`,