def inposition(keyword, lookforurl, positions=''):
  if not positions:
    def gpositions(keyword):
      global positions
      return positions(keyword)
    positions = gpositions(keyword)
  elif positions:
    urldict = json.loads(positions)
    for thepos, aurl in urldict.iteritems():
      if lookforurl.lower() == aurl.lower():
        return thepos
Return the position a provided lookforurl is in for a given keyword.
dataset/ETHPy150Open miklevin/pipulate/common.py/inposition