Skip to content

Madonna-AV scraper causes Identify to bomb out #2795

Description

@mflee1968

Site domain

madonna-av.com

Which scraper type(s) are you requesting?

sceneByFragment

Specific examples

HI there
I am actually developing this scraper and it more or less works however....when I try scraping a scene that is not on the site (say ZBQW.mp4) I am getting a nul pointer deference error. This is sort of ok but when I try using the scraper for "Identify" it causes the Identify process to bomb out. Suspect that is because the exception is not caught.

Error from logs...
scrapeSingleScene: input: scrapeSingleScene Internal system error. Error

Scraper yml...
name: Madonna
sceneByURL:

sceneByFragment:
action: scrapeXPath
queryURL: "https://madonna-av.com/works/detail/{filename}"
scraper: sceneScraper
queryURLReplace:
filename:
- regex: '^([\w-]+).*'
with: "${1}"
- regex: '(-)'
with: ""
sceneByQueryFragment:
action: scrapeXPath
queryURL: "{url}"
scraper: sceneScraper

xPathScrapers:
sceneSearch:
common:
$item: //div[@Class="item"]
scene:
Title: $item//p[@Class="text"]
URL: $item//a[@Class="img hover"]/@href
Image: $item//img/@src

sceneScraper:
common:
$item: //div[@Class="p-workPage l-wrap"]
$code: //div[@Class="p-workPage l-wrap"]//div[@Class="item" and contains(.,"Part Number")]//span[contains(.,"DVD")]/following-sibling::font
scene:
Code:
selector: $code
URL:
selector: $item//div[@Class="item" and contains(.,"Part Number")]//span[contains(.,"DVD")]/following-sibling::font
postProcess:
- replace:
- regex: '([\w]+).'
with: "https://madonna-av.com/works/detail/$1"
Date:
selector: $item//div[@Class="item" and contains(.,"release date")]/div[@Class="td"]//font
postProcess:
- parseDate: "January 2, 2006"
Title:
selector: $code | //h2[@Class="p-workPage__title"]
concat: " "
postProcess:
- replace:
- regex: ^(\D
)(\d*)
with: "$1-$2 "

  Tags:
    Name: $item//div[@class="item" and contains(.,"Genre")]//div[@class="item"]//font/text()
  Performers:
    Name: 
      selector: $item//div[@class="item" and contains(.,"actress")]//div[@class="item"]//font/text()
  Studio:
    Name: $item//div[@class="item" and (contains(.,"Label") or contains(.,"label"))]/div[@class="item"]//font
  Movies:
    Name: $item//div[@class="item" and contains(.,"series")]//div[@class="item"]//font/text()
    URL: $item//div[@class="item" and contains(.,"series")]//a/@href
  Director: $item//div[@class="item" and contains(.,"director")]/div[@class="td"]//font
  Details: //p[@class="p-workPage__text"]
  Image: //img[@class="swiper-lazy swiper-lazy-loaded"]/@src

Identify Task Error....
2026-07-07 09:14:08
Error
goroutine 17261248 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x5e
github.com/stashapp/stash/pkg/job.(*Manager).executeJob.func1()
github.com/stashapp/stash/pkg/job/manager.go:200 +0x13e
panic({0x7ff65a7f9640?, 0x7ff65a5f3ae0?})
runtime/panic.go:792 +0x132
github.com/stashapp/stash/pkg/scraper.mappedScraper.processSceneRelationships({0xc0016dd710, 0xc0014cf380, 0x0, 0x0, 0x0, 0x0, 0x0}, {0x7ff65b4de570, 0xc0022485d0}, {0x7ff65b4e0320, ...}, ...)
github.com/stashapp/stash/pkg/scraper/mapped.go:89 +0xd9
github.com/stashapp/stash/pkg/scraper.mappedScraper.scrapeScene({0xc0016dd710, 0xc0014cf380, 0x0, 0x0, 0x0, 0x0, 0x0}, {0x7ff65b4de570, 0xc0022485d0}, {0x7ff65b4e0320, ...})
github.com/stashapp/stash/pkg/scraper/mapped.go:191 +0x19b
github.com/stashapp/stash/pkg/scraper.(*xpathFragmentScraper).scrapeSceneByScene(0xc00261d860, {0x7ff65b4de570, 0xc0022485d0}, 0x0?)
github.com/stashapp/stash/pkg/scraper/xpath.go:169 +0x1d9
github.com/stashapp/stash/pkg/scraper.definedScraper.viaScene({{{0xc001bc9e3e, 0x7}, {0xc001bc9e00, 0x49}, {0xc00127bd30, 0x7}, 0x0, 0x0, {0x0, 0x0, ...}, ...}, ...}, ...)
github.com/stashapp/stash/pkg/scraper/defined_scraper.go:70 +0x5b8
github.com/stashapp/stash/pkg/scraper.Cache.ScrapeID({0xc0000914a0, 0xc001a1d4a0, {0x7ff65b4e39c0, 0xc0001021e0}, {{0x7ff65b4e00a0, 0xc00042b740}, {0x17b6d1c9668, 0xc0003c1280}, {0x17b6d1c96a8, 0xc00042b540}, ...}}, ...)
github.com/stashapp/stash/pkg/scraper/cache.go:360 +0x88b
github.com/stashapp/stash/internal/manager.scraperSource.ScrapeScenes({0xc0003fa0a0?, {0xc003b4c120?, 0x2?}}, {0x7ff65b4de570?, 0xc0022485d0?}, 0xc0013557c0?)
github.com/stashapp/stash/internal/manager/task_identify.go:313 +0xb4
github.com/stashapp/stash/internal/identify.(*SceneIdentifier).scrapeScene(0xc00089d6e0, {0x7ff65b4de570, 0xc0022485d0}, 0xc00261c9c0)
github.com/stashapp/stash/internal/identify/identify.go:106 +0xe2
github.com/stashapp/stash/internal/identify.(*SceneIdentifier).Identify(0xc00089d6e0, {0x7ff65b4de570, 0xc0022485d0}, 0xc00261c9c0)
github.com/stashapp/stash/internal/identify/identify.go:61 +0x45
github.com/stashapp/stash/internal/manager.(*IdentifyJob).identifyScene.func1()
github.com/stashapp/stash/internal/manager/task_identify.go:153 +0x245
github.com/stashapp/stash/pkg/job.(*Progress).ExecuteTask(0xc0033ec2d0, {0xc0019bc300, 0x5e}, 0xc004aaf9a0)
github.com/stashapp/stash/pkg/job/progress.go:175 +0xb2
github.com/stashapp/stash/internal/manager.(*IdentifyJob).identifyScene(0xc001cc0900, {0x7ff65b4de570, 0xc0022485d0}, 0xc00261c9c0, {0xc00106a620, 0x2, 0x2})
github.com/stashapp/stash/internal/manager/task_identify.go:139 +0x14e
github.com/stashapp/stash/internal/manager.(*IdentifyJob).identifyAllScenes.func1(0xc00261c9c0)
github.com/stashapp/stash/internal/manager/task_identify.go:128 +0x96
github.com/stashapp/stash/pkg/scene.BatchProcess({0x7ff65b4de570, 0xc0022485d0}, {0x17b6d2e0cb8, 0xc0003c1280}, 0xc000215200, 0xc000215200?, 0xc00089dc18)
github.com/stashapp/stash/pkg/scene/query.go:80 +0x1f0
github.com/stashapp/stash/internal/manager.(*IdentifyJob).identifyAllScenes(0xc001cc0900, {0x7ff65b4de570, 0xc0022485d0}, {0xc00106a620, 0x2, 0x2})
github.com/stashapp/stash/internal/manager/task_identify.go:123 +0x2fb
github.com/stashapp/stash/internal/manager.(*IdentifyJob).Execute.func1({0x7ff65b4de570?, 0xc0022485d0?})
github.com/stashapp/stash/internal/manager/task_identify.go:58 +0x107
github.com/stashapp/stash/pkg/txn.WithDatabase({0x7ff65b4de5a8?, 0xc0033ec140?}, {0x17b6d2dc928?, 0xc00042b740?}, 0xc001d19e90)
github.com/stashapp/stash/pkg/txn/transaction.go:135 +0x51
github.com/stashapp/stash/pkg/models.(*Repository).WithDB(...)
github.com/stashapp/stash/pkg/models/repository.go:41
github.com/stashapp/stash/internal/manager.(*IdentifyJob).Execute(0xc001cc0900, {0x7ff65b4de5a8, 0xc0033ec140}, 0xc0033ec2d0)
github.com/stashapp/stash/internal/manager/task_identify.go:56 +0x18c
github.com/stashapp/stash/pkg/job.(*Manager).executeJob(0xc0002c4540, {0x7ff65b4de5a8, 0xc0033ec140}, 0xc0040701e0, 0xc0002a3200?)
github.com/stashapp/stash/pkg/job/manager.go:209 +0x175
created by github.com/stashapp/stash/pkg/job.(*Manager).dispatch in goroutine 23
github.com/stashapp/stash/pkg/job/manager.go:186 +0x205
2026-07-07 09:14:08
Error
panic in job 45 - Identifying...: runtime error: invalid memory address or nil pointer dereference

Additional details

No response

Have you checked the existing scraper list?

  • I confirm that I have checked the existing scraper list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions