-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need the ability to parse saved data by regex #25
Labels
Comments
One possible way to go about this is to add a few more attributes for {
"name": "Save Price",
"target": "#item_price",
"value": "prie",
"type": "integer",
"is_validator": false
} Where type can be one of the following: text, integer, number, regex. Thoughts? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When WebMinion runs and performs the
:save_value
method, it will likely return extraneous text as well desired text.For example, say you want a particular table element and "target" : "//td[1]" there will probably be extra text there, such as this:
#<Nokogiri::XML::Element:0x3fe5fcc42a58 name="td" children=[#<Nokogiri::XML::Text:0x3fe5fcc47468 "SPECIFIC TEXT AND ID HERE: ">, #<Nokogiri::XML::Element:0x3fe5fcc46e00 name="i" children=[#<Nokogiri::XML::Text:0x3fe5fcc46810
So a generic bot method - irrespective of bot driver - to run a regex on saved_data values to clean up data would be great.
The text was updated successfully, but these errors were encountered: