'Get the TvSubtitles id for the given episode. Raises KeyError if none
could be found.'

@cachedmethod
def get_episode_id(self, series_id, season, number):

    episode_id = None
    r = self.session.get(('%s/tvshow-%d-%d.html' % (self.server_url, series_id, season)))
    soup = BeautifulSoup(r.content, self.required_features)
    table = soup.find('table', id='table5')
    for row in table.find_all('tr'):
        cells = row.find_all('td')
        if (not cells):
            continue
        episode_number = match('x([0-9]+)', cells[0].text)
        if (not episode_number):
            continue
        episode_number = int(episode_number)
        episode_id = int(match('episode-([0-9]+)', cells[1].a['href']))
        self.cache_for(self.get_episode_id, args=(series_id, season, episode_number), result=episode_id)
    return self.cached_value(self.get_episode_id, args=(series_id, season, number))
