jamesgpearce / confess

[ARCHIVED] Uses PhantomJS to headlessly analyze web pages and generate manifests. You may be able to use the puppeteer-har package instead.
874 stars 101 forks source link

suport for login #4

Open aadrian opened 11 years ago

aadrian commented 11 years ago

Would be nice if 'confess.js' would have support for login. Many "pages" that need a performance analyze are behind a login (e.g. after login and redirect to a new page)

Thanks in advance.

chino commented 11 years ago

You would have to provide a little snippet of js to handle the login form and other details I believe because it can be so different for each site.

An easy thing which I added in 1 line patch was http authentication support by simply adding this right before page.open:

page.customHeaders = {'Authorization':'Basic '+btoa('user:pass')};

Obviously 'user:pass' above is a place holder that you would want to fill in..

Adding support for this in the command line arguments would be a very simple patch...