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. Writing errors and output to a text file—missing comma in output. #24333

Closed
jprokos opened this issue Mar 12, 2020 · 3 comments
Closed

Help. Writing errors and output to a text file—missing comma in output. #24333

jprokos opened this issue Mar 12, 2020 · 3 comments

Comments

@jprokos
Copy link

@jprokos jprokos commented Mar 12, 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
I am running a script and need the title of the video to remain the same as the path to the downloaded video in order to find and open it via my AppleScript.

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 or arguments cause this. Maybe it's a file encoding issue?

This line in my configuration file:

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

When the file has completed downloading 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 my errors and output file.

$ 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 12, 2020
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 12, 2020

Post the full verbose output.

@dstftw dstftw closed this Mar 12, 2020
@dstftw dstftw added the incomplete label Mar 12, 2020
@jprokos
Copy link
Author

@jprokos jprokos commented Mar 12, 2020

The full verbose output is unnecessary. The file downloads properly. This is the second time you close a request for help. It's not a bug with youtube-dl.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 12, 2020

Then help is unnecessary either. I'm not a telepathist to guess the versions and context and I can't help someone who refuses me to do so.
Also if it's not a bug in youtube-dl why you even report it here?

@ytdl-org ytdl-org locked and limited conversation to collaborators Mar 12, 2020
@dstftw dstftw added the invalid label Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.