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
Lets say you're trying to do xtract https://ubuntu.com "//h2"
Now, there are 36 matches for //h2 on ubuntu.com, but xtract will only return the first match.
I assumed perhaps the results were separated by a newline character, so I've tried, re s/\\n/-/gm [xtract https://ubuntu.com "//h2"] to replace all new lines, \n, with a dash, and it still only returns the first match.
Is there a way to show multiple xpath results with xtract? Am I doing something wrong?
Edit: Trying unions does not return multiple values either. xtract https://ubuntu.com "//h1 | //title" only returns the first match //h1 instead of both matches //h1 and //title in the union.
The text was updated successfully, but these errors were encountered:
Hello. I programmed this script to scrape basic information off of websites. The person who requested this plugin only needed information from a single tag. That's why you'll find the tag = tags[0] line.
1f096ad commit should fix this but I haven't tested the code. Please let me know so I can close this issue.
Lets say you're trying to do
xtract https://ubuntu.com "//h2"
Now, there are 36 matches for //h2 on ubuntu.com, but xtract will only return the first match.
I assumed perhaps the results were separated by a newline character, so I've tried,
re s/\\n/-/gm [xtract https://ubuntu.com "//h2"]
to replace all new lines,\n
, with a dash, and it still only returns the first match.Is there a way to show multiple xpath results with xtract? Am I doing something wrong?
Edit: Trying unions does not return multiple values either.
xtract https://ubuntu.com "//h1 | //title"
only returns the first match//h1
instead of both matches//h1
and//title
in the union.The text was updated successfully, but these errors were encountered: