def getcontent(self):
cookie_text=r'ur=FTW; mid=WsrlLwAEAAEfpCstNyTJl-1oZa0w; ig_pr=1; ig_vh=949; csrftoken=aaaaaaa;ig_vw=186'#字符串格式
cookies = {}
for cookie_unit_text in cookie_text.split('; '):
cookie_unit = cookie_unit_text.split('=')
if len(cookie_unit) >= 2:
cookies[cookie_unit[0]] = cookie_unit[1]
req=requests.session()
req.proxies.update(self.proxies)
for k,v in cookies.items():
req.cookies.set(k, v) # 转换cookies
param1 = quote_plus(r'33ba35852cb50da46f5b5e889df7d159')
param2=quote_plus(r'{"shortcode":"BhRQ25qHnNI","first":1220}')
geturl=r"https://www.instagram.com/graphql/query/?query_hash={}&variables={}".format(param1,param2)
print(geturl)
reqs= req.get(geturl,headers=self.headers)
jsonstr=reqs.json()
pprint.pprint(jsonstr)

  

最新文章

  1. JS高程3.基本概念(6)函数
  2. React Native 接入微博、微信、QQ 登录功能
  3. SELECT控件操作的JS代码示例
  4. 使用MySQL Workbench导出MySQL数据库关系图
  5. haskell中的let和where
  6. 获取XML数据
  7. PAT-乙级-1053. 住房空置率 (20)
  8. bzoj 3932 [CQOI2015]任务查询系统(主席树)
  9. insertion Sort List (链表的插入排序) leecode java
  10. innodb 页分配
  11. 利用SQLiteOpenHelper创建数据库,进行增删改查操作
  12. crawler_工具类_RegexUtils_正则帮助类
  13. Cocos2d-x shader学习3: sprite描边(Outline)
  14. CentOS设置服务开机启动的两种方法
  15. 51单片机学习笔记(清翔版)(21)——ADDA数模转换
  16. phpcms有二级导航并且高亮效果代码
  17. git hub 第一篇
  18. corePoolSize和maxPoolSize的区别
  19. Yii2查询之where条件拼装
  20. NO.1 在Eclipse中安装Maven插件安装详解

热门文章

  1. python实现建立soap通信(调用及测试webservice接口)
  2. 【ABAP系列】SAP F4搜索帮助的高级版
  3. 【Unity Shader】---入门知识点
  4. VUe.js 父组件向子组件中传值及方法
  5. Java基础/利用fastjson序列化对象为JSON
  6. python基础-2 编码转换 pycharm 配置 运算符 基本数据类型int str list tupple dict for循环 enumerate序列方法 range和xrange
  7. idea 社区版本创建javaweb项目 使用tomcat
  8. Spring Boot 中的 Tomcat 是如何启动的?
  9. S5PV210刷机
  10. 洛谷P1095守望者的逃离题解-伪动态规划/贪心