-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[ARDMediathekBridge] Switch to JSON-API #2380
Conversation
The html screen scraping approach of ARDMediathekBridge did not work reliably. I could not find one show for which the item list was not empty using the html screen scraping approach. The proposed change uses the JSON-API of the WebApp. Although there is still room for improvement (feed title, better understanding of the API, more accurate mimic of the webapp's behavior, de-pagination …), it does work with this change.
[ARDMediathekBridge] Fixed phpcs issues: spaces between minus, array_key_last() not available in supported PHP version.
Tested and worked smoothly. Besides that, its good to go. |
That was the requirement of the previous version of the bridge. With this change, the whole URL, the ID with the slug (as before) and just the ID are accepted. The JSON-API that this version of the bridge switched to just needs the ID. Thus, a string extractor has been implemented that obtains the ID. Thus, it maintains compatibility to old inputs. All of the following works:
I guess I best change the label to “Show Link or ID”. |
Indicate that now full URLs as well as just the ID are accepted.
That's perfect! 👌 |
Thanks a lot, @f0086 I have pushed the change to the branch. Once the workflows are done with no problems, I hope for a merge. 😊 I made no changes to the code style and the used functions are the same, so I expect the checks to be successful. |
@@ -4,32 +4,87 @@ class ARDMediathekBridge extends BridgeAbstract { | |||
const URI = 'https://www.ardmediathek.de'; | |||
const DESCRIPTION = 'Feed of any series in the ARD-Mediathek, specified by its path'; | |||
const MAINTAINER = 'yue-dongchen'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
90% of bridge code has been rewritten.
If you, @Mar-Koeh, are going to maintain this bridge, you can add your github name via comma.
Bridge maintainers are pinged in issues, when error happens.
Also question for @yue-dongchen, are still maintaining this bridge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know of the API before. I'll stay there and watch out for new issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
90% of bridge code has been rewritten. If you, @Mar-Koeh, are going to maintain this bridge, you can add your github name via comma.
if @yue-dongchen is fine with it, I'd join maintaining this bridge.
The html screen scraping approach of ARDMediathekBridge did not work reliably. I could not find one show for which the item list was not empty using the html screen scraping approach.
The proposed change uses the JSON-API of the WebApp. Although there is still room for improvement (feed title, better understanding of the API, more accurate mimic of the webapp's behavior, de-pagination …), it does work with this change.