ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.25k stars 10.03k forks source link

Issue with amperstand (& and &) in the querystring #3587

Closed BonzoFestoon closed 10 years ago

BonzoFestoon commented 10 years ago
The following works (url in quotes with & and not & in query string):
youtube-dl --verbose "http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on"

The following do not work:
youtube-dl --verbose http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on

youtube-dl --verbose http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on

youtube-dl --verbose "http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on"

It looks like the extractor is splitting on & to build a playlist maybe?

The output for each, start with what does not work.

D:\youtube-dl>youtube-dl --update
youtube-dl is up-to-date (2014.08.25.3)

D:\youtube-dl>youtube-dl --verbose http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://savelinkas.net/?p=2590']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2014.08.25.3
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] Proxy map: {}
[generic] ?p=2590: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?p=2590: Downloading webpage
[generic] ?p=2590: Extracting information
ERROR: Unsupported URL: http://savelinkas.net/?p=2590; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbo
se flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "youtube_dl\extractor\generic.pyo", line 515, in _real_extract
  File "youtube_dl\utils.pyo", line 1474, in parse_xml
  File "xml\etree\ElementTree.pyo", line 1300, in XML
  File "xml\etree\ElementTree.pyo", line 1642, in feed
  File "xml\etree\ElementTree.pyo", line 1506, in _raiseerror
ParseError: undefined entity: line 12, column 0
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 521, in extract_info
  File "youtube_dl\extractor\common.pyo", line 176, in extract
  File "youtube_dl\extractor\generic.pyo", line 853, in _real_extract
ExtractorError: Unsupported URL: http://savelinkas.net/?p=2590; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with th
e --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.

'amp' is not recognized as an internal or external command,
operable program or batch file.
'amp' is not recognized as an internal or external command,
operable program or batch file.

D:\youtube-dl>youtube-dl --verbose http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://savelinkas.net/?p=2590']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2014.08.25.3
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] Proxy map: {}
[generic] ?p=2590: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?p=2590: Downloading webpage
[generic] ?p=2590: Extracting information
ERROR: Unsupported URL: http://savelinkas.net/?p=2590; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbo
se flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "youtube_dl\extractor\generic.pyo", line 515, in _real_extract
  File "youtube_dl\utils.pyo", line 1474, in parse_xml
  File "xml\etree\ElementTree.pyo", line 1300, in XML
  File "xml\etree\ElementTree.pyo", line 1642, in feed
  File "xml\etree\ElementTree.pyo", line 1506, in _raiseerror
ParseError: undefined entity: line 12, column 0
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 521, in extract_info
  File "youtube_dl\extractor\common.pyo", line 176, in extract
  File "youtube_dl\extractor\generic.pyo", line 853, in _real_extract
ExtractorError: Unsupported URL: http://savelinkas.net/?p=2590; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with th
e --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.

'xink' is not recognized as an internal or external command,
operable program or batch file.
'dmotion' is not recognized as an internal or external command,
operable program or batch file.

D:\youtube-dl>youtube-dl --verbose "http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2014.08.25.3
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] Proxy map: {}
[generic] ?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on: Downloading webpage
[generic] ?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on: Extracting information
ERROR: Unsupported URL: http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on; please report this issue on https://yt-dl.org/bug .
 Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U
to update.
Traceback (most recent call last):
  File "youtube_dl\extractor\generic.pyo", line 515, in _real_extract
  File "youtube_dl\utils.pyo", line 1474, in parse_xml
  File "xml\etree\ElementTree.pyo", line 1300, in XML
  File "xml\etree\ElementTree.pyo", line 1642, in feed
  File "xml\etree\ElementTree.pyo", line 1506, in _raiseerror
ParseError: undefined entity: line 12, column 0
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 521, in extract_info
  File "youtube_dl\extractor\common.pyo", line 176, in extract
  File "youtube_dl\extractor\generic.pyo", line 853, in _real_extract
ExtractorError: Unsupported URL: http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on; please report this issue on https://yt-dl.
org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtub
e-dl -U  to update.

D:\youtube-dl>youtube-dl --verbose "http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://savelinkas.net/?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2014.08.25.3
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] Proxy map: {}
[generic] ?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on: Downloading webpage
[generic] ?p=2590&xink=k1J1YhNklkLeg58oyOL&dmotion=on: Extracting information
[download] Downloading playlist: ???? ? `???'? ??? ? ??  -  ?? ???? ????
[generic] playlist ???? ? `???'? ??? ? ??  -  ?? ???? ????: Collected 1 video ids (downloading 1 of them)
[download] Downloading video #1 of 1
[dailymotion] k1J1YhNklkLeg58oyOL: Downloading webpage
[dailymotion] k1J1YhNklkLeg58oyOL: Extracting information
[dailymotion] k1J1YhNklkLeg58oyOL: Downloading embed page
[debug] Invoking downloader on u'http://www.dailymotion.com/cdn/H264-848x480/video/x21v4pf.mp4?auth=1409172915-2562-3a5for6i-82f9d15d2ec8b74a6edb6cfa4
67c1441'
[download] Resuming download at byte 6289408
[download] Destination: ???1-k1J1YhNklkLeg58oyOL.mp4
[download]   4.5% of 220.63MiB at  5.16MiB/s ETA 00:40
ERROR: Interrupted by user
phihag commented 10 years ago

That's unrelated to youtube-dl. Your shell interprets ampersands (they advise the shell to start a program in the background). So you'll either pick a different shell (although the ampersand functionality is essential, so apart from DOS, you wouldn't find many shells that don't support it) or escape ampersands or put the whole URL in quotes.