Exemplo n.º 1
0
def pokemons(request):
    
    north = request.GET["north"]
    south = request.GET["south"]
    west = request.GET["west"]
    east = request.GET["east"]

    result = get_pokemons_from_db(north, south, west, east)
    scan_area(float(north), float(south),float(west), float(east))
    
    return HttpResponse(json.dumps(result))
def pokemons(request):
    # 1. Get longitude latitude info
    north = request.GET["north"]
    south = request.GET["south"]
    west = request.GET["west"]
    east = request.GET["east"]

    # 2. Query database
    result = get_pokemons_from_db(north, south, west, east)

    # 3. Publish crawl job
    scan_area(float(north), float(south), float(west), float(east))

    return HttpResponse(json.dumps(result))
Exemplo n.º 3
0
def pokemons(request):
    # 1. Get longitude latitude info
    north = request.GET["north"]
    south = request.GET["south"]
    west = request.GET["west"]
    east = request.GET["east"]

    # 2. Query database
    result = get_pokemons_from_db(north, south, west, east)

    # 3. Publish crawl job
    scan_area(float(north), float(south), float(west), float(east))
    
    return HttpResponse(json.dumps(result))
Exemplo n.º 4
0
def pokemons(request):

    # 1. Get longitude and latitude
    north = request.GET["north"]
    south = request.GET["south"]
    east = request.GET["east"]
    west = request.GET["west"]

    logger.info(DBG + "north: " + north)
    logger.info(DBG + "south: " + south)
    logger.info(DBG + "east: " + east)
    logger.info(DBG + "west: " + west)

    # 2. Query database
    result = get_pokemons_from_db(north, south, west, east)

    # 3. Publish for crawl jobs
    scan_area(float(north), float(south), float(west), float(east))

    return HttpResponse(json.dumps(result))