daniel-widrick / zap2it-GuideScraping

MIT License
59 stars 20 forks source link

Doesn't handle if thumbnail is missing #32

Closed Daniel15 closed 1 year ago

Daniel15 commented 1 year ago
Namespace(configfile=None, outputfile=None, language=None, findid=False)
Loading config:  ./zap2itconfig.ini  and outputting:  xmlguide.xmltv
Load Guide for time:  1674734400.0
Load Guide for time:  1674745200.0
Load Guide for time:  1674756000.0
Load Guide for time:  1674766800.0
Traceback (most recent call last):
  File "/opt/zap2it-GuideScraping/./zap2it-GuideScrape.py", line 313, in <module>
    guide.BuildGuide()
  File "/opt/zap2it-GuideScraping/./zap2it-GuideScrape.py", line 256, in BuildGuide
    self.AddEventsToGuide(json)
  File "/opt/zap2it-GuideScraping/./zap2it-GuideScrape.py", line 109, in AddEventsToGuide
    self.rootEl.appendChild(self.BuildEventXmL(event,channel["channelId"]))
  File "/opt/zap2it-GuideScraping/./zap2it-GuideScrape.py", line 141, in BuildEventXmL
    thumnailEl = self.CreateElementWithData("thumnail","http://zap2it.tmsimg.com/assets/" + event["thumbnail"] + ".jpg")
TypeError: can only concatenate str (not "NoneType") to str

[runitor] exit status 1

Also it seems like there's a typo there - "thumnail" instead of "thumbnail"?

daniel-widrick commented 1 year ago

I've just pushed a commit to address the typos in the variable names. I think the actual empty thumbnail bug was addressed in December:

https://github.com/daniel-widrick/zap2it-GuideScraping/commit/d1d77624aba93ffeec9aed0f50fb99f057b0e0a2

Were you by chance running a "release" version rather than a cloned version from the main repo? Can you attempt cloning the main repo and verify that the issue still exists?

Daniel15 commented 1 year ago

@daniel-widrick Good catch! I'm actually on my fork for #29 which is from November. I should have thought about that. I'll update to the latest version :)

Daniel15 commented 1 year ago

Closing this since I think d1d77624aba93ffeec9aed0f50fb99f057b0e0a2 is sufficient to fix it.