mirror of
https://github.com/matthewmueller/x-ray.git
synced 2026-04-03 00:28:41 -06:00
Selecting all the elements of a html #95
Labels
No labels
bug
bug
docs
duplicated
enhancement
enhancement
enhancement
enhancement
feature
feature
help wanted
question
ready for contributor
stale
tech support
tech support
tech support
tech support
tech support
tech support
tech support
tech support
tech support
tech support
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github/x-ray#95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @iCrackk on 4/1/2018
So I want to select all the 'p span' element of the html that looks similar to this:
This is the first one
This is the second one
This is the third one
and this is what my code looks like:
const xray = require('x-ray');
const x = xray();
x(url,'p span')(function(err,product){
if(err == null) console.log(product);
else console.log(err);
})
but the problem is that it only displays the first element that is this:
"This is the first one"
So is there anything that I'm missing? I want to select and display all of the 'p span' elements in this case it would look like:
This is the first one
This is the second one
This is the third one
Any help would be much appreciated.