from django.http import JsonResponse from rest_framework.utils import json from utils import requests_pro # from rest_framework.views import APIView from lxml import etree from utils import orm orm.orm_standby() from dal import models # class WeekRequests(APIView): # def get(self,request): # message = {} # try: sessions =requests_pro.session_requests_b() url="https://movie.douban.com/j/search_subjects?type=movie&tag=%E7%83%AD%E9%97%A8&sort=recommend&page_limit=20&page_start=0" ret = sessions.get(url=url) ret.encoding="utf-8" ret_text =ret.text print(ret_text)
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:【爬虫】 爬虫请求json数据,返回乱码问题的解决 - Python技术站