import json
import time
from django.http import JsonResponse
from Crawling.Crawl import Crawl
from django.views.decorators.csrf import csrf_exempt


@csrf_exempt
def crawl(request):
        req = (request.body.decode('utf-8'))
        return_json_str = json.loads(req)
        mid = return_json_str['mid']

        obj = Crawl(mid)
        obj.main()

        F_json = {'time': str(time.localtime()), 'api': 'item_detail', 'data': obj.data_list}

        return JsonResponse(json.dump(F_json))

@@ -5,23 +5,41 @@
 rt json%0A
+from datetime 
 import 
+date
 time%0Afro
@@ -397,25 +397,28 @@
 str(
+date
 time.
-localtime())
+now())%5B:-4%5D
 , 'a

Fix Time stamp