WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/media-download/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"dependencies": {
"@guardian/transcription-service-common": "1.0.0",
"@guardian/transcription-service-backend-common": "1.0.0",
"@aws-sdk/lib-storage": "3.658.1",
"@imaginerlabs/user-agent-generator": "1.0.2"
"@aws-sdk/lib-storage": "3.658.1"
},
"devDependencies": {
"@types/node": "^20.11.5",
Expand Down
4 changes: 0 additions & 4 deletions packages/media-download/src/yt-dlp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
MediaMetadata,
YoutubeEventDynamoItem,
} from '@guardian/transcription-service-common';
import { generateUserAgent } from '@imaginerlabs/user-agent-generator';

type YtDlpSuccess = {
status: 'SUCCESS';
Expand Down Expand Up @@ -113,7 +112,6 @@ export const downloadMedia = async (
const nextProxy =
proxyUrls && proxyUrls.length > 0 ? proxyUrls[0] : undefined;
const proxyParams = nextProxy ? ['--proxy', nextProxy] : [];
const userAgent = generateUserAgent();
try {
const filepathLocation = `${workingDirectory}/${id}.txt`;
// yt-dlp --print-to-file appends to the file, so wipe it first
Expand All @@ -137,8 +135,6 @@ export const downloadMedia = async (
'--newline',
'-o',
`${workingDirectory}/${id}.%(ext)s`,
'--user-agent',
userAgent,
...proxyParams,
url,
],
Expand Down