发送带有自定义Cookie的请求

时间:2018-08-03 10:37:35

标签: php guzzle instagramapi-mgp25

我正在尝试解决登录帐户时Instagram所面临的挑战,我正在使用mgp25 Instagram API库(V 4.1.0稳定)

图书馆不支持解决Instagram的Challenge_required请求,所以我正在使用他们的

  

Instagram ::请求

功能

我的问题是,当我发送任何请求时,它不包括所有cookie,特别是“中间” cookie(对我的请求至关重要)

打开cookies.dat文件时,我在其中看到它们以及所有其他cookie

[{"Name":"rur","Value":"FRC","Domain":".instagram.com","Path":"\/","Max-Age":null,"Expires":null,"Secure":false,"Discard":false,"HttpOnly":false},{"Name":"mcd","Value":"3","Domain":".instagram.com","Path":"\/","Max-Age":null,"Expires":false,"Secure":false,"Discard":false,"HttpOnly":false},{"Name":"csrftoken","Value":"VjKGMA2gneZlc5Kg5EHupTyZQaXP5mTS","Domain":".instagram.com","Path":"\/","Max-Age":"31449600","Expires":1564704367,"Secure":true,"Discard":false,"HttpOnly":false},{"Name":"mid","Value":"W2OcbwABAAF2Ktvuhr8LBPHcqKPS","Domain":".instagram.com","Path":"\/","Max-Age":"630720000","Expires":false,"Secure":false,"Discard":false,"HttpOnly":false}]

它只在cookie字段中发送“ csrftoken”和“ rur”,即使Instagram在每次响应中都一遍又一遍地设置中间cookie

我该如何解决它并强制将中间Cookie与所有其他Cookie一起发送

0 个答案:

没有答案