python - How to monitor the GET methods of a URL? -


not sure if i'll make sense or not here goes. in google chrome, if rightclick page , go resources, refresh page, can see get/post methods pop happen. i'm wanting know if there way, in python, input url , have generate list of each call listed (not sure if possible)

would love direction on it!
thanks

i believe can clarify parts of original question.

one 1 hand, using browser-built-in debugging tools investigating how website behaves when loaded browser technique, , not replaceable custom code.

on other hand, looks looking html parser, such beautifulsoup.

also, seem confuse meaning of url , html document. url can point html document, in many cases points other things, such json-api endpoint.

assuming wanted ask how "to input url html document , have generate list of each remote resource call browser perform":

before rendering website, web browser fires off initial http request , retrieves main html document. parses document and, among others, searches further resources retrieved. such resources may css files, javascript files, images, iframes, ... (long list). if finds such resources, browser automatically fires off 1 http request each of these resources. can see, there quite work involved , happening behind scenes, before these requests performed browser.

in python, cannot trivially simulate behavior of browser. can retrieve single html document via urllib or requests module. is, can manually fire off single http request retrieve html document. replicating behavior of browser require

  • to parse html document in same way browser does,
  • to search document remote sources such images, css files, ....,
  • to decide remote resources query in order, and
  • then fire off more http requests, , possibly recursively repeat entire process (as required iframes)

exact replication of browser behavior complex. building proper web browser inherently difficult task.

that is, if want understand behavior of website within browser, use browser's debugging tools.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -