Copy variable from network tab preview in Chrome Dev Tools - google-chrome

I'm using the Chrome Dev Tools, and I am digging through the network pane to look at an XHR response with the preview tab. I want to grab a specific object from the preview. But when I try to store as global variable by right clicking preview object, the temp variable created was null.
I find that rather strange since the data is in memory (otherwise it wouldn't be displayed at all). Here's an example of a rather large response array that I'm trying to get a specific object from.
To clarify, I can store a variable that appears in my console. But I can't store a variable from the preview pane of the network tab. Is there any feature of the Chrome Dev Tools I'm overlooking, or am I forced to console log my XHR response and pull the object from there?
I'd really rather not add any console.log() or other breakpoints into my code just to have to remove them later. Digging through the super-long raw JSON response is also not practical. I'm using Chrome 47 on Windows 7.

I can get it to work by going:
Right click on the array index
"Store as global variable"
Then from the console, typing:
copy(temp1);
And then it will be on the clipboard.

Maybe a bit late, but you could go to response tab, copy the response content and then in the console just paste it after :
var response = <<paste here>>
i cant tell by the screenshot but you can then type response.data[64]

Related

Chrome: JSON (or other object) into chrome_debug.log

when I use chrome.exe with --enable-logging parameter it enables chrome to log console messages into debug file.
Sadly it missing the object details:
Example:
[1208:1164:1028/12048.086:INFO:CONSOLE(1)] "%c[WS Message] something color: #7c7c7c", source:something.js (1)
The (1) Stands for the JSON object inside I want to explore in real time in Python. Anyone have idea how to make chrome to save object as string for example in chrome_debug.log?? (Extension or some console command?)
Or any other solution that would enable to view the object in realtime in python?
(Yes i know you can right click on in actual chrome console by mouse then use "copy object", So yes, technicaly, i can make a macro which would do it in real time, but that woud be completely crazy.
I solved this by making Chome extension in Java, that copy-paste JSON objects from dev console. Little bit workaround, but better working that Selenium.

Is there a way to scrape data from a website that is not available in the page's source?

What are the few things that I'll have to include in my code that will point me in the right direction?
For Example this website
Open your browser's debugger on Network tab and observe what are the requests when site is loading dynamic content (when you click). You'll see it's getting all the data using some API, for example: https://www.bestfightodds.com/api?f=ggd&b=3&m=16001&p=2
You can download all the data by changing parameters in this URL.
Usually that's enough but here it's more tricky as the data returned by the server is somehow encoded and not easily readable. You'd have to debug its javascript to find function which is used to decode this data before you can parse it.

Unwanted Output In Console

I've started to get some strange output in my developer console. I was wondering if there was a way to turn it off.
Net state changed from IDLE to BUSY
That outputs whenever anything server side is called, you can imagine that it might cause a lot of clutter.
I was faced out with this issue also, tried to google, but no results.
Do not worry. This output appears when you call add-on back-end by calling google.script.run. It is default output for debugging the state of a connection.
Probably you have a loop that gets information from the add-on backend infinitely.
I'm assuming the messages are coming from warden source.
To solve this, you can simply right click (Windows) or double click (Mac) to bring up the help menu. Then access Filter and click the source of the element you want to filter out of your console. It should then disappear.
Let me know how that works

Is there any way to make Postman default to opening saved requests in new tabs

I know from the Postman docs that I can open saved requests in a new tab either by creating a new tab before clicking on the saved request or with a keyboard shortcut, but I'm hoping there's a way to default Postman to always open requests in new tabs - like the standard functionality of most IDEs.
I frequently find that I've sent a request, then a second, different one and wish I could check something in the response for the first request, but it's no longer there, because the second request opened over the first.
Obviously if I know that I'm going to want the first response, I can explicitly save it, but that's quite cumbersome, and it's usually only after I've sent the next request that I realise I want to refer back.
I suspect the answer is probably to build muscle memory to always hold Ctrl + Shift when clicking a saved request, but it would be nice if there was a setting.
Just realised that this is now possible (or perhaps always was and I just missed it) - in the 'General' tab of the Settings dialog, under the heading 'REQUEST' is a switch for 'Always open requests in new tab'.
There is a setting for this. This image will help:

Chrome: Source of Post Data?

I am using Chrome 15 with Developer Tools to investigate HTTP POST requests. After sending a request, in the Network tab under Headers there is a section called Form Data. This section contains the post data nicely formatted. However: How do I get the source of the post data, i.e. the body of the request?
Currently, I use Firefox with Firebug to get that data, or I reconstruct the source from the formatted Form Data. Cumbersome...
Chrome 29–56, and possibly beyond
Finally (maybe already with version 28), it's simple. Just click on view source next to Form Data:
Also, at least in version 56, post data may be found in the Headers tab, under Request Payload.
Older versions
Chrome 27
Right click in the Name/Path panel in the Network tab.
Select: Copy all as HAR
In the Console, write har=, then paste the HAR, and hit return.
Count from the top the position of the request you are interested, starting at 0. Store the position in: pos
To get the post data source, execute: har.log.entries[pos].request.postData.text
even older:
Right click on the Name/Path of the entry in the Network tab.
Select: Copy entry as HAR
In the Console, write har=, then paste the HAR, and hit return.
To get the post data source, execute: har.request.postData.text
If there is a simpler way, I am happy to hear about it!
it's easier if you:
go to Network
click the entry you want to see the post for
click on the headers tab
scroll down to Form Data