请求重复问题python

2024-04-20 09:09:06 发布

您现在位置:Python中文网/ 问答频道 /正文

因此,我使用请求python库来发出一系列请求

需求1、需求2、需求3

问题是,req1不断重复自身,而不是前进到req2

需要帮忙吗

代码

尽管如此: 尝试:

      session = requests.session()

     r = session.get('Url').text    #req1

     postdata = 'the post data'

     myheader = {'the headers'}

     n = session.post('Myurl ', data=postdata, headers=myheaders).text       #req2

请求不断重复get请求


Tags: the代码texturldatagetsessionpost