Open heiglandreas opened 7 years ago
Feel free to leave a PullRequest :-)
This feature is on the roadmap. I plan to allow a user to be able to define the TYPE of selector they wish to use.
The supported types should be CSS, Xpath, and Regex. (Defaulting to CSS if nothing is supplied in order to not break backwards compatibility)
@heiglandreas The package we're currently using to parse the data already supports Xpath. Can you verify if it works if you provide the selector in the following format? "/html/body/div/p"
Whoot!! Awesome! I'll check that later today!
@heiglandreas I've just written some unit tests for the Xpath selectors, and these scenarios seem to work just fine :)
Yesterday evening I struggeled with the setup and got some weird PDO-Exceptions.
Can you add a further test with f.e. the XPath //a[@Class="test"]
? If that works, then everything else should as well ;)
@heiglandreas
Done, and seems to work just fine. Can you send me a screengrab of the error your received?
Lemme first perhaps walk through the readme properly and not skip steps ;) I'm sure that help. I might send a PR for that then…
@heiglandreas Note that 0.3 has just been released, including better xpath support, regex support, and a test call, which you can use to test the response before saving it.
Woops, didnt mean to close this.
@heiglandreas Did you manage to get it working? :)
It would be pretty nice to be able to use XPath as selector-language as well.