Repository navigation
I'm not seeing a way for custom transformations #757
Unanswered
KegenGuyll
asked this question in
Forums - Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
I'm wanting to see if a value exist on the page web page. If the value exist then return
trueelsefalse.Different Attempts
falseeven if the value matches.{ "name": "Master Card", "baseSelector": "#aspnetForm > table", "fields": [ // ... other fields that are not relative { "name": "is_rookie", "selector": "#ctl00_MainContent_cellMiddle > font:nth-child(10)", "type": "regex", "pattern": r"Rookie", "default": False } ] }https://docs.crawl4ai.com/extraction/no-llm-strategies/
But in practice, I don't see any example of how to do this (maybe I'm doing something wrong). I've looked at the function that handles the transform and it doesn't even look possible to pass your own transform functions.
https://github.com/unclecode/crawl4ai/blob/3b1025abbb6e2565602c05f9a959458da3531f3a/crawl4ai/extraction_strategy.py#L991C4-L1014C21
I'm kinda stuck here and would love some input on possible solutions and if it would prove helpful I can post more snippets of my code.
There is more that likely some obvious solution, that is staring me right in the face and I'm too dumb to notice it.
All reactions