Commit 4d60b3f4 authored by Lysander Trischler's avatar Lysander Trischler

Support YouTube video IDs starting with a dash

Previously any YouTube video ID starting with a dash, such as
`-c9-poC5HGw`, caused youtube-dl to fail with an invocation error as the
command line argument containing the video ID was misinterpreted as an
option. So separate the video ID clearly from any options.
parent 23c9b979
......@@ -27,7 +27,7 @@ __copyright__ = "Copyright 2012-2018, Lysander Trischler"
__license__ = "WTFPL"
__maintainer__ = "Lysander Trischler"
__email__ = ""
__version__ = "1.0.1"
__version__ = "1.0.2"
import os.path
import os
......@@ -115,7 +115,7 @@ class Video(object):
def get_info(cls, video_id):
stdout = subprocess.check_output(['youtube-dl', '--ignore-config', '-j', video_id])
stdout = subprocess.check_output(['youtube-dl', '--ignore-config', '-j', '--', video_id])
return json.loads(stdout.decode('utf-8'))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment