def dereferring(url, fn):
 if ('derefer.me' in url):
  _RE_DEREFER = re.compile('content=".*url=([^"]+)">')
  data = fn.read()
  for line in data.split('\n'):
   if ('<meta' in line):
    m = _RE_DEREFER.search(data)
    if m:
     return m.group(1)
 return None

def dereferring ( url , fn ) : if ( 'derefer.me' in url ) : _RE_DEREFER = re . compile ( 'content=".*url=([^"]+)">' ) data = fn . read ( ) for line in data . split ( '\n' ) : if ( '<meta' in line ) : m = _RE_DEREFER . search ( data ) if m : return m . group ( 1 ) return None
find out if were being diverted to another location .