Skip to content
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

Get meta data? #9

Closed
TJF0700 opened this issue Jul 18, 2017 · 4 comments
Closed

Get meta data? #9

TJF0700 opened this issue Jul 18, 2017 · 4 comments

Comments

@TJF0700
Copy link

TJF0700 commented Jul 18, 2017

I have a need to get the content of meta data - how is this possible?
<meta content="Tim Fischer" name="author">

Thanks

@zmarty
Copy link
Contributor

zmarty commented Jul 18, 2017

How about:
//meta[@name='author']/content

@zmarty zmarty closed this as completed Jul 18, 2017
@TJF0700
Copy link
Author

TJF0700 commented Jul 18, 2017

That didn't work:
I tried: //meta[@name='author']/content and //meta[@name='author']/@content

With the @ sign, I get a null "author", but without the @ sign, there isn't a returned json field at all.

@TJF0700
Copy link
Author

TJF0700 commented Jul 18, 2017

Ok - the code only accounts for the innerHtml - thinking that if the last element in the xpath query has an @ sign, go for the attribute data instead.... thoughts?

@zmarty
Copy link
Contributor

zmarty commented Jul 18, 2017

Yes, see here for the problem and a workaround: #6

I did not have time to implement an official fix yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants