Replace Post-processing function can be used in agents to replace some text with another in extracted field result. For example, I have this scraping agent “Replace Function Example(Post-Processing)” in my account. And I want to replace the $
symbol with USD
from the ProductPrice field in each row. So, I can use the built-in Replace
post-processing function here.
Steps
-
Edit the scraping agent by clicking on the Edit tab
-
Go to the field ProductPrice and click on the Edit field button
-
Now, click on the Add Post-processing button to add the
Replace function
, the below dialog box will appear -
Now, enter the text you want to replace in the ReplaceWhat parameter the old value (which needs to be replaced)
-
Then enter the text you want to replace with in the ReplaceWith parameter the new value
-
Then, Save the function and the scraping agent configuration
-
And finally, re-run your agent to apply the changes.
After Replace Function
If you notice the screenshot below, the field ProductPrice is updated by the Replace
Post-processing function.