Skip to content

Commit 8be740b

Browse files
Merge pull request #17 from micahmo/fix/channel-icon
Handle channel icon URLs with double slashes
2 parents 7cde9e8 + 87a58b7 commit 8be740b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zap2it-GuideScrape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def BuildChannelXML(self,channel):
170170
dispName3 = self.CreateElementWithData("displayName",channel["callSign"])
171171
dispName4 = self.CreateElementWithData("displayName",channel["affiliateName"].title())
172172
iconEl = self.guideXML.createElement("icon")
173-
iconEl.setAttribute("src","http://"+channel["thumbnail"].partition('?')[0])
173+
iconEl.setAttribute("src","http://"+(channel["thumbnail"].partition('?')[0] or "").lstrip('/'))
174174
channelEl.appendChild(dispName1)
175175
channelEl.appendChild(dispName2)
176176
channelEl.appendChild(dispName3)

0 commit comments

Comments
 (0)