Skip to content

best way to save what you love

removed mobile user agent because douyin doesnt need it

wukkoe19837417b62
diff --git a/src/config.json b/src/config.json
index b2a1c757..4b0885b5 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 34e3acf3..da7f7081 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 3e45ad60..e3224ebc 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`,