mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-13 01:22:11 +00:00
chore: Update User-Agents (#1058)
YouTube.js has been using the same user agents for 3 years. Maybe YouTube doesn't care that much about the User-Agent, but keeping them updated is good anyways.
This commit is contained in:
@@ -5,7 +5,7 @@ import { writeFile } from 'fs/promises';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const buf = await (await fetch('https://github.com/intoli/user-agents/blob/master/src/user-agents.json.gz?raw=true')).arrayBuffer();
|
||||
const buf = await (await fetch('https://github.com/intoli/user-agents/raw/refs/heads/main/src/user-agents.json.gz?raw=true')).arrayBuffer();
|
||||
const bytes = new Uint8Array(buf);
|
||||
|
||||
// Only get desktop and mobile agents
|
||||
|
||||
Reference in New Issue
Block a user