예제 #1
0
파일: xkcd.py 프로젝트: piagetbot/sopel
def google(query):
    url = google_search(query + sites_query)
    if not url:
        return None
    match = re.match('(?:https?://)?xkcd.com/(\d+)/?', url)
    if match:
        return match.group(1)
예제 #2
0
def google(query):
    url = google_search(query + sites_query)
    if not url:
        return None
    match = re.match('(?:https?://)?xkcd.com/(\d+)/?', url)
    if match:
        return match.group(1)