Fix crashes, improve scraping resilience, and update UX - #65
Open
OnceUponALoop wants to merge 4 commits into
Open
Fix crashes, improve scraping resilience, and update UX#65OnceUponALoop wants to merge 4 commits into
OnceUponALoop wants to merge 4 commits into
Conversation
OnceUponALoop
marked this pull request as ready for review
February 6, 2026 18:30
Add a `scraped` boolean column to the links table to track which pages were successfully scraped, distinct from the existing `visited` flag. Wrap session.get() in try/except for RequestException so the scraping loop continues on network errors instead of crashing. Failed requests are marked as visited (won't retry) but not scraped, allowing future flexibility to distinguish between: - err: request failed (timeout, connection error, DNS failure) - skip: request succeeded but page unusable (non-200 or non-HTML) - ok: page successfully scraped
Add a second status line below the progress bar showing the URL
currently being fetched, using tqdm position stacking with a
bare bar_format='{desc}' line.
Track three outcome counters displayed as postfix stats:
- ok: page successfully scraped
- err: request failed (timeout, connection error, DNS failure)
- skip: request succeeded but page unusable (non-200 or non-HTML)
Also moves pbar.update() to after the request completes so the bar
reflects completed work rather than started work.
OnceUponALoop
force-pushed
the
fix/skip-none-content-in-individual-export
branch
from
February 6, 2026 18:33
8818ea3 to
edeffae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TypeErrorwhen exporting individual markdown for pages withNonecontent (e.g. failed fetches, non-HTML resources). The other two export methods already had this guard.--timeout/-TCLI option for request timeouts. Default isNone(no timeout, matching original behavior).scrapedcolumn to links table to distinguish between pages that were visited vs successfully scraped. Wrapsession.get()in try/except so network errors don't crash the scraping loop.ok/err/skipcounters tracking outcomes:ok: page successfully scrapederr: request failed (timeout, connection error, DNS failure)skip: request succeeded but page unusable (non-200 or non-HTML content type)