Unescaped quotation marks when stream title/description passed to player
See original GitHub issueDescription
A stream with quotation marks in the title won’t launch so long as the stream title is passed to Livestreamer to then be passed to the video player.
Expected / Actual behavior
Stream title gets passed to player (mpv) without issues.
Reproduction steps
- Add the
{status}
parameter in your video player settings. - Find a stream with quotes in the title/description.
- Try launching the stream.
Environment details (operating system, etc.)
Windows 8.1 x64 mpv
Comments, logs, screenshots, etc.
Traceback (most recent call last):
File "<string>", line 6, in <module>
File "__main__.py", line 128, in <module>
File "__main__livestreamer__.py", line 9, in <module>
File "livestreamer_cli\main.py", line 886, in main
File "livestreamer_cli\main.py", line 491, in handle_url
File "livestreamer_cli\main.py", line 369, in handle_stream
File "livestreamer_cli\main.py", line 203, in output_stream_passthrough
File "livestreamer_cli\output.py", line 21, in open
File "livestreamer_cli\output.py", line 121, in _open
File "livestreamer_cli\output.py", line 131, in _open_call
File "livestreamer_cli\output.py", line 116, in _create_arguments
File "shlex.py", line 279, in split
File "shlex.py", line 269, in next
File "shlex.py", line 96, in get_token
File "shlex.py", line 172, in read_token
ValueError: No closing quotation
Offending part of title:
["Blah blah blah" - Somebody]
I’m not sure if the brackets have anything to do with it but I didn’t test a stream without brackets and quotes only.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to escape double quotes in a title attribute - Stack Overflow
I am trying to use a string that contains double quotes in the title attribute of an anchor. So far I ...
Read more >Narrative of the Life of Frederick Douglass, an American Slave ...
All single right and left quotation marks are encoded as ' and ' respectively. Indentation in lines has not been preserved. Running titles...
Read more >Escape Room (2019) - IMDb
Six strangers find themselves in a maze of deadly mystery rooms and must use their wits to survive.Six strangers find themselves in a...
Read more >String resources | Android Developers
Beware that you must escape apostrophes and quotation marks. See Formatting and Styling, below, for information about to properly style and ...
Read more >Escape double quotes in JSON using Power Automate
This blog post will give you a how-to of escaping those pesky double quotes in JSON when using Power Automate.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This seems to be fixed by Streamlink…
I was using the stable release but I just tried the latest git from master and everything works fine. I even used brackets like
"[\"foo\"]"
and there weren’t any issues. Your unit tests pass and you were already escaping quotation marks before you rewrote the regex so I don’t understand why I was having issues. I forgot that I already had a recent build that I should’ve used to test the stream last night when I was having the issue. I’ll remember to do that next time.