# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 import re import time from oxlib import stripTags, findRe from oxlib.cache import getUrlUnicode import google def getUrl(title): ''' Search Epguide Url for Show via Show Title. Use Google to search the url, this is also done on Epguide. ''' for (name, url, desc) in google.find('allintitle: site:epguides.com %s' % title, 1): if url.startswith('http://epguides.com'): if re.search(title, name): return url return None def getShowData(url): data = getUrlUnicode(url) r = {} r['title'] = stripTags(findRe(data, '