Esempio n. 1
0
def a_sendurl(request):
    if request.method == "POST":
        url = request.POST["url"]

        if url == "":
            return HttpResponse(0)

        images = get_images(url)
        if images == 0:
            return HttpResponse(0)

        return HttpResponse(json.dumps(images))
    else:
        return HttpResponse(0)
Esempio n. 2
0
def a_sendurl(request):
    if request.method == "POST":
        url = request.POST['url']

        if url == '':
            return HttpResponse(0)

        images = get_images(url)
        if images == 0:
            return HttpResponse(0)

        return HttpResponse(json.dumps(images))
    else:
        return HttpResponse(0)
Esempio n. 3
0
def a_sendurl(request):
    if request.method == "POST":
        url = request.POST['url']
        
        if url == '':
            return HttpResponse(0)
        print url
        url="http://image.sinajs.cn/newchart/daily/n/%s.gif" % url
        images = get_images(url)
        if images == 0:
            return HttpResponse(0)
        
        return HttpResponse(json.dumps(images))
    else:
        return HttpResponse(0)