{"action":"created","issue":{"url":"https://api.github.com/repos/PuerkitoBio/goquery/issues/140","repository_url":"https://api.github.com/repos/PuerkitoBio/goquery","labels_url":"https://api.github.com/repos/PuerkitoBio/goquery/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/PuerkitoBio/goquery/issues/140/comments","events_url":"https://api.github.com/repos/PuerkitoBio/goquery/issues/140/events","html_url":"https://github.com/PuerkitoBio/goquery/issues/140","id":194563653,"number":140,"title":"function Find returns more than expected","user":{"login":"HouLinwei","id":1674774,"avatar_url":"https://avatars.githubusercontent.com/u/1674774?v=3","gravatar_id":"","url":"https://api.github.com/users/HouLinwei","html_url":"https://github.com/HouLinwei","followers_url":"https://api.github.com/users/HouLinwei/followers","following_url":"https://api.github.com/users/HouLinwei/following{/other_user}","gists_url":"https://api.github.com/users/HouLinwei/gists{/gist_id}","starred_url":"https://api.github.com/users/HouLinwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HouLinwei/subscriptions","organizations_url":"https://api.github.com/users/HouLinwei/orgs","repos_url":"https://api.github.com/users/HouLinwei/repos","events_url":"https://api.github.com/users/HouLinwei/events{/privacy}","received_events_url":"https://api.github.com/users/HouLinwei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-09T10:36:01Z","updated_at":"2016-12-12T12:40:09Z","closed_at":null,"body":"Thank you for your code.\r\n \r\nWhen I use it, I find a  problem(may be my bad use)\r\n\r\nmy test documents are like this:\r\n\r\n`\r\n<channel>\r\n<items><title>name1</title></items>\r\n<items><title>name2</title></items>\r\n</channel>\r\n`\r\nand I want to get items.title. What I write at first is:\r\n`\r\n// for loop\r\ndoc.Find(\"item\").Eq(index).Find(\"title\").Text()\r\n`\r\nI find the outputs are:\r\n`\r\nname1 name2\r\nname2\r\n`\r\nI read your code https://github.com/PuerkitoBio/goquery/blob/master/traversal.go#L541\r\nLater I change my code as belongs:\r\n`\r\n// for loop\r\ndoc.Find(\"item\").Eq(index).Find(\"title\").Eq(0).Text()\r\n`\r\nand it works.\r\n\r\nMy question is:\r\n It's designed like this? if yes, why?\r\n"},"comment":{"url":"https://api.github.com/repos/PuerkitoBio/goquery/issues/comments/266421774","html_url":"https://github.com/PuerkitoBio/goquery/issues/140#issuecomment-266421774","issue_url":"https://api.github.com/repos/PuerkitoBio/goquery/issues/140","id":266421774,"user":{"login":"PuerkitoBio","id":692384,"avatar_url":"https://avatars.githubusercontent.com/u/692384?v=3","gravatar_id":"","url":"https://api.github.com/users/PuerkitoBio","html_url":"https://github.com/PuerkitoBio","followers_url":"https://api.github.com/users/PuerkitoBio/followers","following_url":"https://api.github.com/users/PuerkitoBio/following{/other_user}","gists_url":"https://api.github.com/users/PuerkitoBio/gists{/gist_id}","starred_url":"https://api.github.com/users/PuerkitoBio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PuerkitoBio/subscriptions","organizations_url":"https://api.github.com/users/PuerkitoBio/orgs","repos_url":"https://api.github.com/users/PuerkitoBio/repos","events_url":"https://api.github.com/users/PuerkitoBio/events{/privacy}","received_events_url":"https://api.github.com/users/PuerkitoBio/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T12:40:09Z","updated_at":"2016-12-12T12:40:09Z","body":"Again, please give:\r\n\r\n1. The exact data that actually causes the issue\r\n2. The exact code that reproduces the issue (full, runnable main.go)\r\n3. What you would expect the exact output to be vs what you get\r\n\r\nI'll try to help you out. I think it may be related to the use of what looks like rss data with an html parser. The go html parser treats some well-known html tags differently (it enforces some restrictions based on the html spec, and those may not make sense in a non-html document).\r\n\r\nMartin"}}
{"actor":{"display_login":"PuerkitoBio"}}