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

Procedure for using tv_grab_uk_tvguide #93

Closed FlexMcMurphy closed 4 years ago

FlexMcMurphy commented 4 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?

… Don't know... I just installed xmltv-utils in osmc xmltv -- version tells me: command not found image

XMLTV Component?

… I am trying to get tv_grab_uk_tvguide to work

What happened?

When I initially run it like this:

tv_grab_uk_tvguide -- configure

It created this file: /home/osmc/.xmltv/tv_grab_uk_tvguide.conf

However then when trying to run it like this:

tv_grab_uk_tvguide

I get the error: spawn: XMLTV::Supplement: Failed to read from /home/osmc/.xmltv/supplement/tv_grab_uk_tvguide/tv_grab_uk_tvguide.map.conf

What did you expect to happen?

Did you see any warnings/errors?

(Please paste any warnings/errors, if available) …

What steps are needed to reproduce this issue?

(Please provide the full commands you are running)

Any other information?

(For example, is this a new or intermittent issue?)

This time I moved (and renamed) tv_grab_uk_tvguide.conf to… /home/osmc/.xmltv/supplement/tv_grab_uk_tvguide/tv_grab_uk_tvguide.map.conf

Then ran this command..

tv_grab_uk_tvguide

Over a period of almost 3 hours! it produced 3291 files in: /root/home/osmc/.xmltv/cache I think the only reason it stopped is because I went for a walk and the laptop went to sleep in my absence. But then again it did keep going for more than an hour in my absence so maybe it did actually finally finish grabbing all the files it felt it needed to? The average file size is about 85KB… total size 280MB.

Looking in each file they are not xml files but html files.

image

After those six lines of No Schedule Found the command line window froze and became unresponsive.

Like I said before

tv_grab_uk_tvguide -- configure

Created this file: /home/osmc/.xmltv/tv_grab_uk_tvguide.conf

It contains 639 lines and here are the first few lines... cachedir=/home/osmc/.xmltv/cache channel=1004 channel=1011 channel=1012 channel=1013 channel=1014 channel=1032 channel=1036

What am I supposed to do with this file?

When I read some man pages on the net such as this it talks about using the tv_grab_uk_tvguide.map.conf file... is this a different file from what..

tv_grab_uk_tvguide -- configure

.. created for me??

Also it talks about using that conf file "to map the channel ids used by the site into something more meaningful to your PVR. E.g. map==74==BBC 1". So how come then my conf file has rows of channel=xxxx ?? Also how would I know what channel ids tvguide.co.uk uses for each channel name?

So hopefully can someone please clarify for me how I am supposed to use this grabber? I could try it again using the tvguide.co.uk internal grabber Tvheadend but I don't want it holding up my laptop and downloading files for another 3 hours.

What other software are you using?

Operating System: … Linux osmc 4.19.55-6-osmc #1 SMP PREEMPT Sun Nov 3 22:15:28 UTC 2019 armv7l GNU/Linux

Perl Version: … This is perl 5, version 24, subversion 1 (v5.24.1) built for arm-linux-gnueabihf-thread-multi-64int

honir commented 4 years ago

You are mixing up the files

/home/osmc/.xmltv/tv_grab_uk_tvguide.conf /home/osmc/.xmltv/supplement/tv_grab_uk_tvguide/tv_grab_uk_tvguide.map.conf

These are totally different, and have different content and purpose.

If osmc is not creating a default tv_grab_uk_tvguide.map.conf - for you to subsequently edit - then you will need to create one yourself (and report a bug to osmc developers) .

If you try to grab all of the channels available on the TV Guide website then yes it will take over 3 hours to download the data. You should configure the grabber to download only the channels you watch. Both as a courtesy to the TV Guide website, and also to reduce the time taken to fetch the tv listings.

If you require a faster download then you will need to use a different grabber, e.g. tv_grab_zz_sdjson (requires subscription). .

Run tv_grab_uk_tvguide --configure

and follow the on-screen prompts to select the channels you watch.

(Note there should be no space between -- and configure)

You then run the grabber like so to fetch listings for your selected channels for the next 3 days

tv_grab_uk_tvguide --days 3 --output /home/osmc/my_listings

FlexMcMurphy commented 4 years ago

Thanks for your response.

I fixed the two config files and as a test asked for epg data on one channel only... More4. This time I ran the grabber not from the command line but from within TvHeadend. It took 6 mins and downloaded 126 files.

When I went in to Kodi EPG there was still no EPG guide info there.

Here is the log output from TVHeadend: It seems like it ran ok (slowly) but didn't find any epg data for More4.

2020-05-05 12:52:12.443 xmltv: /usr/bin/tv_grab_uk_tvguide: grab /usr/bin/tv_grab_uk_tvguide
2020-05-05 12:52:12.454 spawn: Executing "/usr/bin/tv_grab_uk_tvguide"
2020-05-05 12:52:14.618 spawn: Fetching listings
2020-05-05 12:58:27.076 xmltv: /usr/bin/tv_grab_uk_tvguide: grab took 375 seconds
2020-05-05 12:58:27.079 xmltv: /usr/bin/tv_grab_uk_tvguide: parse took 0 seconds
2020-05-05 12:58:27.079 xmltv: /usr/bin/tv_grab_uk_tvguide:  channels   tot=    1 new=    1 mod=    1
2020-05-05 12:58:27.079 xmltv: /usr/bin/tv_grab_uk_tvguide:  brands     tot=    0 new=    0 mod=    0
2020-05-05 12:58:27.079 xmltv: /usr/bin/tv_grab_uk_tvguide:  seasons    tot=    0 new=    0 mod=    0
2020-05-05 12:58:27.079 xmltv: /usr/bin/tv_grab_uk_tvguide:  episodes   tot=    0 new=    0 mod=    0
2020-05-05 12:58:27.079 xmltv: /usr/bin/tv_grab_uk_tvguide:  broadcasts tot=    0 new=    0 mod=    0

I also repeated this for other channels: E4 and CBS Justice but got the same results... lots of files downloaded and the module gets added to TVheadend but no epg data appears in Kodi client.

I had previously run the external grabber: xmltv.co.uk and loaded epg data from there into TvHeadend, using the cat... | socat ... method and it did find epg data for E4 but did not find any data for More4 or CBS Justice.

Is there a way to debug some more... I don't see errors in TvHeadend.

In your last response you say to run this command: tv_grab_uk_tvguide --days 3 --output /home/osmc/my_listings

How would you then load the downloaded files into TvHeadend? Using the cat... | socat method to the .sock file?

Cheers,

Flex

By the way: In case anyone is reading this with same problems as myself.. I extracted the tvguide.co.uk channel ids to channel numbers and the mappings are in attached file current as of May 2020.

tvguide.co.uk - Channel IDs with Names.txt

FlexMcMurphy commented 4 years ago

I realise now that after I restarted TvHeadend server it kicked off the tvguide.co.uk grabber again. It was still configured to retrieve epg data for CBS Justice only.. this time it DID get epg data for that channel.

There seems to be a problem with the live update feed from Tvheadend. Trying to reconnect...
Reconnected to Tvheadend
2020-05-05 14:02:18.948 mpegts: 11934V in DVB-S Network - tuning on SAT>IP DVB-S Tuner #1 (192.168.1.102)
2020-05-05 14:02:18.949 subscription: 0002: "192.168.1.3 [ osmc | Kodi Media Center ]" subscribing on channel "Challenge", weight: 150, adapter: "SAT>IP DVB-S Tuner #1 (192.168.1.102)", network: "DVB-S Network", mux: "11934V", provider: "BSkyB", service: "Challenge", profile="htsp", hostname="192.168.1.3", username="osmc", client="Kodi Media Center"
2020-05-05 14:02:54.000 xmltv: /usr/bin/tv_grab_uk_tvguide: grab /usr/bin/tv_grab_uk_tvguide
2020-05-05 14:02:54.004 spawn: Executing "/usr/bin/tv_grab_uk_tvguide"
2020-05-05 14:02:56.226 spawn: Fetching listings
2020-05-05 14:04:05.993 http: 192.168.1.3: HTTP/1.1 HEAD /imagecache/58 -- 404
2020-05-05 14:07:04.371 xmltv: /usr/bin/tv_grab_uk_tvguide: grab took 250 seconds
2020-05-05 14:07:04.431 xmltv: /usr/bin/tv_grab_uk_tvguide: parse took 0 seconds
2020-05-05 14:07:04.431 xmltv: /usr/bin/tv_grab_uk_tvguide:  channels   tot=    1 new=    0 mod=    0
2020-05-05 14:07:04.431 xmltv: /usr/bin/tv_grab_uk_tvguide:  brands     tot=    0 new=    0 mod=    0
2020-05-05 14:07:04.431 xmltv: /usr/bin/tv_grab_uk_tvguide:  seasons    tot=    0 new=    0 mod=    0
2020-05-05 14:07:04.431 xmltv: /usr/bin/tv_grab_uk_tvguide:  episodes   tot=  111 new=  110 mod=  110
2020-05-05 14:07:04.431 xmltv: /usr/bin/tv_grab_uk_tvguide:  broadcasts tot=  111 new=  110 mod=  110

I don't understand why it didn't work for the CBS Justice channel first time and then did after restarting Tvheadend? It gave about 4 days of epg data.

Maybe it will give epg data for E4 and More4 if I run it again for them? This grabber seems flaky to me... downloads lots of files, kind of hacky approach to extracting epg data from a website looks like?

Flex

honir commented 4 years ago

You are conflating TVHeadend and XMLTV Project. This forum is for XMLTV command-line only. If you have issues with TVHeadend not working then you need to take it up with those developers.
( https://tvheadend.org/projects/tvheadend/boards )