question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unescaped quotation marks when stream title/description passed to player

See original GitHub issue

Description

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

  1. Add the {status} parameter in your video player settings.
  2. Find a stream with quotes in the title/description.
  3. 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:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bastimeyercommented, Nov 21, 2016

This seems to be fixed by Streamlink…

1reaction
Poorchopcommented, Jun 2, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found