Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help keeping title information intact (missing comma) in output file #24317

Closed
jprokos opened this issue Mar 11, 2020 · 1 comment
Closed

Help keeping title information intact (missing comma) in output file #24317

jprokos opened this issue Mar 11, 2020 · 1 comment

Comments

@jprokos
Copy link

@jprokos jprokos commented Mar 11, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

WRITE QUESTION HERE
Not sure this is the best place to ask this but.... I am running a script and need to keep the title of the video the same as the path to the downloaded video in order to find and open it via PATH.

I am writing errors and output to a text file called vidstatus and referencing those lines to give feedback to AppleScript on the progress of the youtube-dl request.

When I run this in AppleScript a comma is removed from the title in the tmp file.

do shell script "cd /tmp/; /usr/local/bin/youtube-dl --newline --ffmpeg-location /usr/local/bin/ffmpeg " & currentURL & " > /tmp/vidstatus 2>&1 & echo $!"

I get a report like this:

[youtube] wvYJ_j92bjU: Downloading webpage
[youtube] wvYJ_j92bjU: Downloading video info webpage
[download] /Volumes/Godzilla/Video/YouTube Video/Nathan Adrian vs Caeleb Dressel _ Mens 100m Free B Final _ 2020 TYR Pro Swim Series - Des Moines-wvYJ_j92bjU.mp4 has already been downloaded and merged

In this instance the issue is in the word Mens. The comma has been removed when writing the output to the file. I am not sure what process is causing this.

This line in my configuration file:

-o '/Volumes/Godzilla/Video/YouTube Video/%(title)s-%(id)s.%(ext)s'

When the file is downloaded the path looks like this:

/Volumes/Godzilla/Video/YouTube Video/Nathan Adrian vs Caeleb Dressel _ Men’s 100m Free B Final _ 2020 TYR Pro Swim Series - Des Moines-wvYJ_j92bjU.mp4

The difference between Men's and Mens is a stumbling block for my AppleScript. Is there a way around this issue?

When running youtube-dl in terminal the comma is not removed from errors and output.

$ youtube-dl https://www.youtube.com/watch?v=wvYJ_j92bjU
[youtube] wvYJ_j92bjU: Downloading webpage
[youtube] wvYJ_j92bjU: Downloading video info webpage
[download] /Volumes/Godzilla/Video/YouTube Video/Nathan Adrian vs Caeleb Dressel _ Men’s 100m Free B Final _ 2020 TYR Pro Swim Series - Des Moines-wvYJ_j92bjU.mp4 has already been downloaded and merged
@jprokos jprokos added the question label Mar 11, 2020
@dstftw dstftw closed this Mar 11, 2020
@dstftw dstftw added the incomplete label Mar 11, 2020
@jprokos
Copy link
Author

@jprokos jprokos commented Mar 11, 2020

dstftw Please remove incomplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.