-
Notifications
You must be signed in to change notification settings - Fork 70
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
not detecting complete set of meta tags #35
Comments
Hello! I'm not seeing the same results as you. I downloaded the HTML with the command curl -OL "http://www.nytimes.com/2015/08/16/technology/inside-amazon-wrestling-big-ideas-in-a-bruising-workplace.html" When I opened the downloaded file in a text editor, I counted ten instances of May I ask how you're counting 31 and 50+ meta tags? Are you loading the page in a browser? |
Hi Nolan Thanks for getting back so quickly. Yup when I look at the source code in
The metaNodes array consistently comes back on my side to be 31 objects. Wow that very strange you are getting 10. Would the meta tag count be twitter:app:url:googleplay Thanks! On Mon, Aug 17, 2015 at 7:38 PM, Nolan Waite notifications@github.com
|
Oh, I was not very careful. Turns out that curl command gets redirected to the login page because it isn't accepting cookies. I changed it to: curl -OL -c cookies.txt "http://www.nytimes.com/2015/08/16/technology/inside-amazon-wrestling-big-ideas-in-a-bruising-workplace.html" And got a text file with 92 instances of the string import HTMLReader
let path = NSBundle.mainBundle().pathForResource("updog.html", ofType: nil)!
let data = NSData(contentsOfFile: path)!
let home = HTMLDocument(data: data, contentTypeHeader: nil)
home.nodesMatchingSelector("meta").count and got a count of 92 matching nodes. Just for fun, I went to the page you linked in Safari, opened the Web Inspector, typed document.querySelectorAll('meta').length into the console, and got 93. Is any of this helpful? |
Hi Nolan Yup I'm getting the 93 when I'm running the javascript query as well. I'm running this code in a brand new iOS singleview project after importing
contentTypeHeader:contentType]; On Tue, Aug 18, 2015 at 8:31 PM, Nolan Waite notifications@github.com
|
I'm afraid I'm nearly out of ideas! If you take the |
@jameslin101 did you ever solve this? |
No I was not able to solve it. Probably a one-off issue with that On Sun, Sep 20, 2015 at 3:34 PM, Nolan Waite notifications@github.com
|
Hi,
I am trying to parse meta tags using this code:
I ran the code through this page:
http://www.nytimes.com/2015/08/16/technology/inside-amazon-wrestling-big-ideas-in-a-bruising-workplace.html
and it only picked up 31 meta tags when there is clearly 50+
The text was updated successfully, but these errors were encountered: