public
Description: Simple to use TVDB (thetvdb.com) API in Python, and automatic TV episode namer
Homepage: http://dbr.lighthouseapp.com/projects/13342-tvdb_api/tickets
Clone URL: git://github.com/dbr/tvdb_api.git
Added _cleanName function which replaces URL-encoded & with "and"
dbr (author)
Mon Jun 09 05:07:16 -0700 2008
commit  9f197201f43a2162ff42a5cdd197815bb8cdee25
tree    e7bd3990fd8a2562780463b3d506aadc456e6d36
parent  852632f40c1792ae640c1a7641eefc3578eaf673
...
154
155
156
 
 
 
 
 
157
158
159
160
161
 
162
163
164
...
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
0
@@ -154,11 +154,17 @@ class tvdb:
0
         return mirrors
0
     #end _getMirrors
0
 
0
+ def _cleanName(self,name):
0
+ name = name.replace("&","and")
0
+ return name
0
+ #end _cleanName
0
+
0
     def _getSeries(self,series):
0
         seriesSoup = self._getsoupsrc( self.config['url_getSeries'] % (series) )
0
         allSeries=[]
0
         for series in seriesSoup.findAll('series'):
0
             cur_name = series.find('seriesname').contents[0]
0
+ cur_name = self._cleanName(cur_name)
0
             cur_sid = series.find('id').contents[0]
0
             self.log.debug('Found series %s (id: %s)' % (cur_name,cur_sid))
0
             allSeries.append( {'sid':cur_sid, 'name':cur_name} )

Comments

    No one has commented yet.