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

ZDF uses semicolon in video description; bug with python2 #28

Merged
merged 1 commit into from
May 23, 2023

Conversation

mosterta
Copy link

ZDF uses semicolon in video description. The description is added with other parameters into an URL. When parsing and spliting the URL in python2 the semicolon is used as a separator which leads to a wrong data in the resulting dictionary and video cannot be found by video player.

Semicolon is replaced by "." instead and everything works again in python2

ZDF uses semicolon in video description. The description is added with
other parameters into an URL. When parsing and spliting the URL in
python2 the semicolon is used as a separator which leads to a wrong data
in the resulting dictionary and video cannot be found by video player.

Semicolon is replaced by "." instead and everything works again in
python2
Copy link
Owner

@rols1 rols1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very useful, thank you.
I've found now that videos from ZDF-funk very often contain punctuations in description, which cannot pass the router function (even in matrix and nexus). So I take your patch temporarily until the corresponding replace functions in modul util are completed with code for valid chars.

@rols1 rols1 merged commit 8c8118f into rols1:master May 23, 2023
1 check passed
@rols1
Copy link
Owner

rols1 commented May 23, 2023

I had not noticed the problem, because I test changes mainly with Kodi Matrix. So thanks again for the hint about the dict problem.
I had pushed your patch this morning as a single update, but in the meantime integrated it into an extension of the valid_title_chars function (util). It is called in ZDF_get_content, so is not limited to ZDF_PageMenu, where your patch was.
In valid_title_chars, the semicolon is then eliminated along with other router incompatible characters. This makes the calls to repl_json_chars dispensable.
But I remove these sporadically and when I have a better day (2 ugly typos this morning).

@mosterta
Copy link
Author

basically I did just a quick & dirty hack to get ZDF mediathek running again on my production system. I pushed the hack to make you aware of the difference in behavior between python2 and python3 code. Therefore I am completely fine if you rework and/or integrate the change in different way into the production code.
Thanks for making all the efforts to adapt for changes in the ZDF json format/mediathek.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants