@NotWegant (Sorry for my English).
When you make a GET request in the response, you will have cookies for this URL. Then you will save them. Is this option not working?
For your second question read this post from @Fox ,
maybe its what you need. Its in Russian, but you can
use translator. There is an example script too >
In the browser, all these scripts are executed automatically, if you work with the site via the http-client, then you will have to execute these scripts manually.