[GH-ISSUE #31] Add Support for Site Logins #21

Closed
opened 2026-03-01 14:39:54 +03:00 by kerem · 4 comments
Owner

Originally created by @marlowe310 on GitHub (Jul 1, 2017).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/31

I'm trying to archive a few bookmarks that require I be logged in to the site itself for content to be visible -- which means BA is just outputting a page with the content concealed at this time.

Is there a way to log the chromium instance BA is using in, to prevent that from happening? Thanks much, very impressive work.

Originally created by @marlowe310 on GitHub (Jul 1, 2017). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/31 I'm trying to archive a few bookmarks that require I be logged in to the site itself for content to be visible -- which means BA is just outputting a page with the content concealed at this time. Is there a way to log the chromium instance BA is using in, to prevent that from happening? Thanks much, very impressive work.
kerem 2026-03-01 14:39:54 +03:00
Author
Owner

@pirate commented on GitHub (Jul 2, 2017):

Have you tried logging in to the sites using chrome normally before running the script? Headless chrome is just a command line interface to normal Chrome, so it uses all the same cookies. Any sessions you log into via normal chrome should carry over in headless mode... Edit: it's not supported yet

If that doesn't work, there is another way but it's quite difficult. You run headless chrome with the remote debugging port open, then send custom JS commands (which depend on the structure of the site) to issue a POST request which logs you in. It's quite tricky to do, because you'd have to run the commands within the initial time window before chrome takes the screenshot.

<!-- gh-comment-id:312474753 --> @pirate commented on GitHub (Jul 2, 2017): Have you tried logging in to the sites using chrome normally before running the script? Headless chrome is just a command line interface to normal Chrome, ~~so it uses all the same cookies. Any sessions you log into via normal chrome should carry over in headless mode...~~ Edit: [it's not supported yet](https://bugs.chromium.org/p/chromium/issues/detail?id=617931) If that doesn't work, there is another way but it's quite difficult. You run headless chrome with the remote debugging port open, then send custom JS commands (which depend on the structure of the site) to issue a POST request which logs you in. It's quite tricky to do, because you'd have to run the commands within the initial time window before chrome takes the screenshot.
Author
Owner

@pirate commented on GitHub (Jul 6, 2017):

Closing this for now, but comment back if you're still having trouble and I'd be happy to re-open this and help out!

Added a note to the docs as well: a7d1213

<!-- gh-comment-id:313530665 --> @pirate commented on GitHub (Jul 6, 2017): Closing this for now, but comment back if you're still having trouble and I'd be happy to re-open this and help out! Added a note to the docs as well: a7d1213
Author
Owner

@pirate commented on GitHub (Jul 22, 2017):

I stand corrected, apparently chrome --headless runs in incognito mode: https://bugs.chromium.org/p/chromium/issues/detail?id=617931

<!-- gh-comment-id:317163389 --> @pirate commented on GitHub (Jul 22, 2017): I stand corrected, apparently `chrome --headless` runs in incognito mode: https://bugs.chromium.org/p/chromium/issues/detail?id=617931
Author
Owner

@pirate commented on GitHub (Oct 30, 2017):

Done! https://github.com/pirate/bookmark-archiver/releases/tag/v0.0.3

<!-- gh-comment-id:340386268 --> @pirate commented on GitHub (Oct 30, 2017): Done! https://github.com/pirate/bookmark-archiver/releases/tag/v0.0.3
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#21
No description provided.