Add --email flag for email-gated decks - #1
Conversation
When a DocSend deck requires email verification, the tool now accepts an --email flag to automatically fill in the email and continue instead of raising an error. Works via CLI (--email) and Python API (email=).
|
Heya @naxIO! Thanks for this. Can you please add tests so that we can clearly validate the way that this works? Have a look in the tests directory for examples. I'd like to be able to clearly validate functionality of this feature via tests. Thanks! |
|
@brandonmoak I see that you've forked this and have made some downstream changes to this functionality. I'd welcome your contribution and collaboration on this feature, as you've both found it useful. I'd also welcome a PR on the folder support feature you've added. I'm keen to make this useful to as many people as possible. https://github.com/brandonmoak/docsend-dl/tree/feat/folder-support Thanks! |
|
Will do. It worked for me but tests is always a good idea! |
Tests cover email gate detection (primary + fallback selectors), email submission flow (Continue button, Enter fallback, post-submit failure), CLI --email argument parsing, and download_deck() email passthrough. All tests use mocked Playwright — no network required. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add input[type="email"] as third fallback selector in extractor.py so email-gated decks with non-standard markup are still detected - Add tests for the generic selector path (detection + submission) - Document email parameter in download_deck() docstring Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Done! |
|
I checked out this PR and the feature is working for me 100%! @captivus if you'd like to merge and make a release. |
|
Thanks for your patience here, and apologies for how long it's taken me to come back to this. @jojochuang thanks as well for taking the time to check out the PR and report that the feature worked in practice for you. The feature itself is genuinely useful, and I appreciate that you came back and added automated tests after the earlier review. The CLI/API wiring looks good, and the mocked Playwright coverage does a good job exercising the selector and submission branches. What’s still missing for me is the validation level this repo uses for network-facing behavior. When I pointed you to the So the gap here isn’t “there are no tests” -- you did add useful tests. The gap is that the tests don’t yet prove this works against the live DocSend flow in the same way the existing integration tests prove the public-deck flow. Since this feature is specifically about email-gated decks, I’m looking for at least one integration test that exercises the full flow against a real gated deck, not only mocked Playwright objects. If you’re up for iterating on it, I’d be glad to review a follow-up. I appreciate the contribution, and I think this would be a strong addition once the validation matches the rest of the project. |
Summary
--emailCLI option andemail=Python API parameter to support email-gated DocSend decks--email, the existingEmailGateErroris raised with a helpful messageUsage
Changes
emailparameter toextract_slide_urls(). Instead of immediately closing the browser on email gate detection, it fills in the email and clicks "Continue"emailparameter passthrough indownload_deck()--emailargument to the CLI parserTest plan
--emailon gated deck raises clearEmailGateError