

def referrerkeyword(referrer):
    from urllib import unquote_plus as unquote
    pattern = 'q=(?P<scrape>.*?)(&|$)'
    match = re.search(pattern, referrer, (re.S | re.I))
    if match:
        if ('scrape' in referrer.groupdict().keys()):
            keyword = match.group('scrape')
            keyword = unquote(keyword)
            return keyword
    else:
        return None

dataset/ETHPy150Open miklevin/pipulate/common.py referrerkeyword/VarMisuse@51/72 `match`->`referrer`