Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kcrg committed Dec 20, 2024
1 parent 0fbef78 commit 6849bd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Services/DownloadService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ public async Task<DownloadResult> DownloadAsync(string videoId)
string fileName = $"{videoId}.webm";
string filePath = Path.Combine("cache", fileName);

var ytDlpArgs = $"-f bestaudio/webm --output \"cache/%(id)s.%(ext)s\" \"https://www.youtube.com/watch?v={videoId}\"";
const string poToken = "MpQBVIMwe2IgAD5UuyPg1C3R-8K4yCV9Qu1mzDw_3QCtBo5A_a4o4U3FD0jSuvBGVlar41bIKvHpT9bThtJ_MgY4fc361PmO5Ud7D5BNVT3ocg2cbDhfGWPykxyiKcu6tksEmVVg0U2m2X1YPx2xvUxBnHtDk7DBbj6VBBQshxkxzBTosihvOzWRtrMB8b0yHE1udbhKpQ==";
const string visitorData = "CgtCbF80UDlNM3dGNCig-pa7BjIiCgJQTBIcEhgSFhMLFBUWFwwYGRobHB0eHw4PIBAREiEgGw%3D%3D";

var ytDlpArgs = $"--cookies cookie.txt --extractor-arg \"youtube:player_client=web;po_token=web+{poToken};visitor_data={visitorData};player_skip=webpage,configs\" -f bestaudio/webm --output \"cache/%(id)s.%(ext)s\" \"https://www.youtube.com/watch?v={videoId}\"";

logger.LogInformation("Attempting to download VideoId: {VideoId} using yt-dlp with args: {Args}", videoId, ytDlpArgs);

Expand Down

0 comments on commit 6849bd4

Please sign in to comment.