You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful to filter the text retrieved during read operations by passing a function to be called each time text is extracted.
My use-case is such that I have to manipulate the urls retrieved when scanning the src attribute of some script tags before they are used in any subsequent tasks.
The text was updated successfully, but these errors were encountered:
Hmm. You could always use callback for that. Not sure it would be much simpler if done as part of read. You can write to a task config by doing something like:
I'm currently using the callback option to perform this task but the code I've written is almost exactly the same as the read operation with the only difference being a modification of the attribute I've read. I reckon that the ability to mutate the data gathered by read would be useful in enough cases to warrant adding an option for it.
I've added a pull request to show the relatively minimal impact this should have.
It would be very useful to filter the text retrieved during read operations by passing a function to be called each time text is extracted.
My use-case is such that I have to manipulate the urls retrieved when scanning the
src
attribute of somescript
tags before they are used in any subsequent tasks.The text was updated successfully, but these errors were encountered: