{"action":"created","issue":{"url":"https://api.github.com/repos/gawel/pyquery/issues/192","repository_url":"https://api.github.com/repos/gawel/pyquery","labels_url":"https://api.github.com/repos/gawel/pyquery/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/gawel/pyquery/issues/192/comments","events_url":"https://api.github.com/repos/gawel/pyquery/issues/192/events","html_url":"https://github.com/gawel/pyquery/issues/192","id":338837961,"node_id":"MDU6SXNzdWUzMzg4Mzc5NjE=","number":192,"title":"\"doc = pq(driver.page_source)\" can not find elements","user":{"login":"iamhmx","id":28919096,"node_id":"MDQ6VXNlcjI4OTE5MDk2","avatar_url":"https://avatars0.githubusercontent.com/u/28919096?v=4","gravatar_id":"","url":"https://api.github.com/users/iamhmx","html_url":"https://github.com/iamhmx","followers_url":"https://api.github.com/users/iamhmx/followers","following_url":"https://api.github.com/users/iamhmx/following{/other_user}","gists_url":"https://api.github.com/users/iamhmx/gists{/gist_id}","starred_url":"https://api.github.com/users/iamhmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamhmx/subscriptions","organizations_url":"https://api.github.com/users/iamhmx/orgs","repos_url":"https://api.github.com/users/iamhmx/repos","events_url":"https://api.github.com/users/iamhmx/events{/privacy}","received_events_url":"https://api.github.com/users/iamhmx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-06T07:43:05Z","updated_at":"2018-08-22T03:49:55Z","closed_at":null,"author_association":"NONE","body":"when i use selenium get the \"page_source\", and find the elements by pyquery, not work; but when i use \"doc = pq(url='https://xxxxx')\" directly, it works well. codes below：\r\npart one:\r\n```\r\nfrom pyquery import PyQuery as pq\r\ndoc = pq(url='https://search.jd.com/Search?keyword=%E7%A9%BA%E6%B0%94%E5%87%80%E5%8C%96%E5%99%A8&enc=utf-8&suggest=1.def.0.V18&wq=kongqijingh&pvid=60c4120a5787482e8337c64c2fd4184d')\r\nfor item in doc('.gl-i-wrap').items():\r\n            price = item('.p-price strong i').text()\r\n            print('price:', price)\r\n```\r\nworks well!\r\npart two:\r\n```\r\nhtml = self.driver.page_source\r\ndoc = pq(html)\r\nfor item in doc('.gl-i-wrap').items():\r\n            price = item('.p-price strong i').text()\r\n            print('price:', price)\r\n```\r\nnot work!"},"comment":{"url":"https://api.github.com/repos/gawel/pyquery/issues/comments/414901110","html_url":"https://github.com/gawel/pyquery/issues/192#issuecomment-414901110","issue_url":"https://api.github.com/repos/gawel/pyquery/issues/192","id":414901110,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDkwMTExMA==","user":{"login":"Saren-Arterius","id":4948919,"node_id":"MDQ6VXNlcjQ5NDg5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/4948919?v=4","gravatar_id":"","url":"https://api.github.com/users/Saren-Arterius","html_url":"https://github.com/Saren-Arterius","followers_url":"https://api.github.com/users/Saren-Arterius/followers","following_url":"https://api.github.com/users/Saren-Arterius/following{/other_user}","gists_url":"https://api.github.com/users/Saren-Arterius/gists{/gist_id}","starred_url":"https://api.github.com/users/Saren-Arterius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saren-Arterius/subscriptions","organizations_url":"https://api.github.com/users/Saren-Arterius/orgs","repos_url":"https://api.github.com/users/Saren-Arterius/repos","events_url":"https://api.github.com/users/Saren-Arterius/events{/privacy}","received_events_url":"https://api.github.com/users/Saren-Arterius/received_events","type":"User","site_admin":false},"created_at":"2018-08-22T03:49:55Z","updated_at":"2018-08-22T03:49:55Z","author_association":"NONE","body":"This issue affects me too. Try print the first 200 characters of `page_source`, then remove the attribute of `<html>`. In my case, I have to do this for CSS selectors to work while I am scrapping Facebook WAP.\r\n```\r\nhtml = b.page_source.replace('<html xmlns=\"http://www.w3.org/1999/xhtml\">', '<html>')\r\ndoc = pq(html)\r\n```"}}
{"actor":{"display_login":"Saren-Arterius"}}