XMLTV / xmltv

Utilities to obtain, generate, and post-process TV listings data in XMLTV format
GNU General Public License v2.0
275 stars 93 forks source link

tv_grab_dk_dr is broken #119

Closed aasimon closed 1 year ago

aasimon commented 3 years ago

Thanks for taking the time to report an issue. Please take a moment to review our open/closed issues above, in case your issue has already been reported.

If you are reporting a new issue, please give your issue a descriptive title and fill out the blanks below, providing as much information as possible.

XMLTV Version?

Latest git master (commit: b3cae7dc4ae5131df8c4746b5125842d04802579)

XMLTV Component?

tv_grab_dk_dr

What happened?

Running it now results in an error.

What did you expect to happen?

Fetch the Danish DR TV program like it used to.

Did you see any warnings/errors?

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">

Use of uninitialized value $_ in concatenation (.) or string at /usr/bin/tv_grab_dk_dr line 264.
Failed to get channels:  at /usr/bin/tv_grab_dk_dr line 264.
Can't use an undefined value as an ARRAY reference at /usr/bin/tv_grab_dk_dr line 268.
<tv source-info-url="https://www.dr.dk/drtv/tv-guide" source-info-name="DR TV Oversigt" generator-info-name="XMLTV" generator-info-url="http://niels.dybdahl.dk/xmltvdk/">

What steps are needed to reproduce this issue?

Just run tv_grab_dk_dr

Any other information?

On November 2nd 2020 it worked. No change in config or otherwise on my side has happended and on November 3rd 2020 it started failing, so probably something changed serverside. I noticed that the URL that is printed in the error message does not work. It may have been discontinued or wrongly configured in the DNS. I do not know whether this could be the cause of the issue.

What other software are you using?

Operating System: devuan

Perl Version: v5.30.0

aasimon commented 3 years ago

Some further investigation hints that the new JSON URL should now be https://www.dr-massive.com/api/schedules but I am not sure how to correctly insert it into the script.

aasimon commented 3 years ago

If someone could point me in the right direction I could probably try to make a fix myself?

honir commented 3 years ago

Some further investigation hints that the new JSON URL should now be https://www.dr-massive.com/api/schedules but I am not sure how to correctly insert it into the script.

The API you mention is a different system to one used by this grabber. It requires both a login and seems to be restricted access.

It appears the source website ( http://www.dr.dk/tjenester/program-guide/json/guide/ ) has gone away (now returns a 301 to the website home page) so this grabber is now broken.

knowledgejunkie commented 3 years ago

After a quick interrogation of the JSON responses from the API requests when visiting https://www.dr-massive.com/drtv/tv-guide?channel_group=all, it looks possible to use the API to get at (some of?) the listings data, but this would require a rewrite of the grabber and not breach the new site's terms and conditions. It seems a login and dk address is required for full functionality.

I'll disable the grabber in the Makefile, but keep the code around should anyone want to look into this further.