首页 > 解决方案 > Intercepting and accessing intermediate Json's hit response in python playwright

问题描述

I am trying to get response for an intermediate json's page to extract some information from it,but I am always getting "Timeout while waiting for event "response" error in return.Code sample is as given below

''' with page.expect_response(lambda response: response.url == "host_url"+"/admininfo") as response_info:
      page.click(search_button_xpath)
      print(response_info.value.body())
      print(response_info.body())'''

I also tried page.route but no success.

标签: pythonweb-scrapingweb-crawlerbrowser-automationplaywright

解决方案


推荐阅读