Skip to content

Comments

fix: skip invalid deviantart download targets without src#9081

Closed
harshang03 wants to merge 1 commit intomikf:masterfrom
harshang03:fix/9072-deviantart-missing-src
Closed

fix: skip invalid deviantart download targets without src#9081
harshang03 wants to merge 1 commit intomikf:masterfrom
harshang03:fix/9072-deviantart-missing-src

Conversation

@harshang03
Copy link

Summary

  • avoid hard failures when DeviantArt download payloads do not include a media source URL
  • treat non-downloadable payloads as authorization failures and continue extraction safely
  • add shared media-source resolution helper and apply it to other extractors that previously assumed src was always present
  • add focused regression tests for DeviantArt source-missing behavior

What changed

  • gallery_dl/extractor/deviantart.py: skip invalid targets, validate download payloads, and handle restricted downloads without crashing
  • gallery_dl/extractor/common.py: add media_source() helper for defensive URL extraction
  • gallery_dl/extractor/shopify.py: skip image entries without source URL
  • gallery_dl/extractor/pexels.py: guard missing video/image source links
  • gallery_dl/extractor/newgrounds.py: guard missing source URLs in video format selection
  • test/test_deviantart.py: regression tests for missing-source and authorization paths

Test plan

  • ./.venv/bin/python -m pytest test/test_deviantart.py test/test_job.py

Fixes #9072

Prevent KeyError crashes when download payloads omit src by validating media-source fields, skipping invalid targets safely, and reusing the same defensive source resolution in related extractors.
@mikf mikf closed this Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deviantart error: KeyError: 'src'

2 participants