2014-01-02, 19:01
(2014-01-01, 23:06)jcato Wrote: Okay, I fixed the above error by changing line 343 in defauly.py from:
Code:match = re.compile('<span class="year">(.+?)<\/span>', re.DOTALL).findall(videoDetails)
to
match = re.compile('<span class="year" >(.+?)<\/span>', re.DOTALL).findall(videoDetails)
In the results I get, there should be a space after "year".
I ran into another problem with the show The Blue Planet: A Natural History of the Oceans. In the return results, the show's title is "The Blue Planet: A Natural History of...". The dots at the end prevented the stream files from being created. I believe the problem is that windows directories can't end (or start) with a period. So, I changed line 536 from:
Code:seriesFolderName = (''.join(c for c in unicode(seriesTitle, 'utf-8') if c not in '/\\:?"*|<>')).strip()
to
seriesFolderName = (''.join(c for c in unicode(seriesTitle, 'utf-8') if c not in '/\\:?"*|<>')).strip(' .')
This strips out white space and periods from the beginning and end of the name.
Although it hasn't been a problem yet, I made the same change for adding movies on line 524.
This may not be the best solutions, I don't know much python, but it seems to work for me.
Thanks for the idea. I have items that return both with and without the extra space so it would still blow up. I changed line 339 to this and got past my current problem (tinkering with the regex would be a better solution but I wanted quick and dirty):
Code:
videoDetails = getVideoInfo(videoID).replace("\\n", "").replace("\\", "").replace("\"year\" >", "\"year\">")