removed mobile user agent because douyin doesnt need it
This commit is contained in:
parent
600952aa51
commit
e19837417b
3 changed files with 2 additions and 4 deletions
|
@ -2,7 +2,6 @@
|
||||||
"streamLifespan": 1800000,
|
"streamLifespan": 1800000,
|
||||||
"maxVideoDuration": 1920000,
|
"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",
|
"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": {
|
"authorInfo": {
|
||||||
"name": "wukko",
|
"name": "wukko",
|
||||||
"link": "https://wukko.me/",
|
"link": "https://wukko.me/",
|
||||||
|
|
|
@ -9,7 +9,6 @@ version = packageJson.version,
|
||||||
streamLifespan = config.streamLifespan,
|
streamLifespan = config.streamLifespan,
|
||||||
maxVideoDuration = config.maxVideoDuration,
|
maxVideoDuration = config.maxVideoDuration,
|
||||||
genericUserAgent = config.genericUserAgent,
|
genericUserAgent = config.genericUserAgent,
|
||||||
mobileUserAgent = config.mobileUserAgent,
|
|
||||||
repo = packageJson["bugs"]["url"].replace('/issues', ''),
|
repo = packageJson["bugs"]["url"].replace('/issues', ''),
|
||||||
authorInfo = config.authorInfo,
|
authorInfo = config.authorInfo,
|
||||||
supportedLanguages = config.supportedLanguages,
|
supportedLanguages = config.supportedLanguages,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import got from "got";
|
import got from "got";
|
||||||
import loc from "../../localization/manager.js";
|
import loc from "../../localization/manager.js";
|
||||||
import { genericUserAgent, mobileUserAgent } from "../config.js";
|
import { genericUserAgent } from "../config.js";
|
||||||
|
|
||||||
export default async function(obj) {
|
export default async function(obj) {
|
||||||
try {
|
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: {
|
let iteminfo = await got.get(`https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=${obj.postId}`, {headers: {
|
||||||
'authority': 'www.iesdouyin.com',
|
'authority': 'www.iesdouyin.com',
|
||||||
'user-agent': mobileUserAgent,
|
'user-agent': genericUserAgent,
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
'accept': '*/*',
|
'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`,
|
'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`,
|
||||||
|
|
Loading…
Reference in a new issue