Merge branch 'wukko:current' into current

This commit is contained in:
Lexito 2022-07-30 08:37:30 -04:00 committed by GitHub
commit bf8fded0c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 4 deletions

View file

@ -40,6 +40,7 @@ Code might be a little messy, but I do my best to improve it with every commit.
### npm modules ### npm modules
- cors - cors
- dotenv - dotenv
- esbuild
- express - express
- express-rate-limit - express-rate-limit
- ffmpeg-static - ffmpeg-static

View file

@ -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/",

View file

@ -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,

View file

@ -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`,