tvgrabbers / tvgrabnlpy

Deze versie is deprecated zie: tvgrabpyAPI
https://github.com/tvgrabbers/tvgrabpyAPI
GNU General Public License v2.0
27 stars 8 forks source link

Nothing is being fetched / generated (2.2.17) #69

Closed pensionado closed 7 years ago

pensionado commented 7 years ago

Same problem as a couple of days ago, say some sort of date error on nieuwsblad.be

tv_grab_nl_py.conf.tar.gz

hikavdh commented 7 years ago

I see it. I have a solution ready for that, but am still working on some other things. It seems to only happen for some channels. nieuwsblad.be is only important for some of the Flemish regional channels, so I don't think you're missing something.

pensionado commented 7 years ago

In so far that NO output is generated at all, so no programs information for anything at all look at xml_output xml_output.tar.gz So as far as I am concerned it is a total show stopper.

hikavdh commented 7 years ago

Right I didn't look far enough down the log. I cannot disable the source from here, that final solution is also in the pre-release I'm still working on, but you can do it yourself with

disable_source = 8

in the [configuration] section of your configuration file.

pensionado commented 7 years ago

Now I get these errors for een and canvas, I can send the files.

2016-09-01 12:57:49 : An unexpected error has occured in the vrt.be thread: 2016-09-01 12:57:49 : Traceback (most recent call last): 2016-09-01 12:57:49 : File "./tv_grab_nl.py", line 11959, in load_pages 2016-09-01 12:57:49 : tdict['start-time'] = self.get_datetime(p['startTime']) 2016-09-01 12:57:49 : File "./tv_grab_nl.py", line 11824, in get_datetime 2016-09-01 12:57:49 : date = datetime.datetime.strptime(date_string.split('.')[0], '%Y-%m-%dT%H:%M:%S').replace(tzinfo = UTC).astimezone(CET_CEST) 2016-09-01 12:57:49 : AttributeError: 'module' object has no attribute '_strptime' 2016-09-01 12:57:49 : No Data from vrt.be for channel: een 2016-09-01 12:57:49 : No Data from vrt.be for channel: canvas

Do get output though, even for een en canvas.

hikavdh commented 7 years ago

I have to go right now. I'll look later this afternoon

hikavdh commented 7 years ago

It is very annoying. Now nieuwsblad.be is behaving again. They at random switch between weekday names and an actual date. I also noticed that vpro.nl is again playing with their format, adding extra format text that breaks the fetch. I added a regex to sourcematching to fix, but the call to it is in the wrong place and is missing for configure.
If you for now want vpro.nl working again make the following change: around line 10806

                try:
                    noquote = ""
                    strdata = self.clean_html(strdata)
+                    strdata = self.check_text_subs(strdata)
                    if len(self.availabe_days) == 0:
                        self.get_available_days(strdata)
                        lineup = self.get_channel_lineup(strdata)

and around line 10828

                        #~ noquote = re.sub('data-playable\n', 'data-playable=""\n', noquote)
                        #~ noquote = re.sub('data-playable ', 'data-playable="" ', noquote)

-                    noquote = self.check_text_subs(noquote)
                    htmldata = ET.fromstring(noquote.encode('utf-8'))

If you want configure to work add around line 10503:

        try:
            strdata = config.get_page(self.get_url())
            strdata = self.clean_html(strdata)
+            strdata = self.check_text_subs(strdata)
            if strdata == None:
                self.fail_count += 1
hikavdh commented 7 years ago

Oh and I cannot reproduce your error on vrt.be and anyway it is a weird error. It suggests corruption of your python installation. It says in essence that the strptime function in datetime suddenly does not exist anymore??? So let me know if you see it again.

hikavdh commented 7 years ago

I just did create a small bug fix with the above mentioned fixes: https://github.com/tvgrabbers/tvgrabnlpy/releases/tag/beta-2.2.18-p20160901