def find_show_id(self, show_name, db_sess):
    show_name = show_name.lower()
    db_show = db_sess.query(PogcalShow).filter((PogcalShow.name == show_name)).first()
    if db_show:
        return db_show.id
    try:
        page = session.get('http://www.pogdesign.co.uk/cat/showselect.php')
    except requests.RequestException as e:
        log.error(('Error looking up show show list from pogdesign calendar: %s' % e))
        return
    show_re = name_to_re(None, show_name)
    soup = get_soup(page.content)
    search = re.compile(show_re, flags=re.I)
    show = soup.find(text=search)
    if show:
        id = int(show.previous['value'])
        db_sess.add(PogcalShow(id=id, name=show_name))
        return id
    else:
        log.verbose(('Could not find pogdesign calendar id for show `%s`' % show_re))
def find_show_id(self, show_name, db_sess):
    show_name = show_name.lower()
    db_show = db_sess.query(PogcalShow).filter((PogcalShow.name == show_name)).first()
    if db_show:
        return db_show.id
    try:
        page = session.get('http://www.pogdesign.co.uk/cat/showselect.php')
    except requests.RequestException as e:
        log.error(('Error looking up show show list from pogdesign calendar: %s' % e))
        return
    show_re = name_to_re(None, show_name)
    soup = get_soup(page.content)
    search = re.compile(show_re, flags=re.I)
    show = soup.find(text=search)
    if show:
        id = int(show.previous['value'])
        db_sess.add(PogcalShow(id=id, name=show_name))
        return id
    else:
        log.verbose(('Could not find pogdesign calendar id for show `%s`' % show_re))