{"action":"created","comment":{"url":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/comments/175351292","pull_request_review_id":104863228,"id":175351292,"diff_hunk":"@@ -543,8 +543,14 @@ def check_link(browser,\n \n def like_image(browser, username, blacklist, logger, logfolder):\n     \"\"\"Likes the browser opened image\"\"\"\n-    like_elem = browser.find_elements_by_xpath(\n-        \"//a[@role='button']/span[text()='Like']/..\")\n+    like_elem = []\n+\n+    # fetch spans fast\n+    spans = [x.text.lower() for x in browser.find_elements_by_xpath(\"//article//a[@role='button']/span\")]\n+\n+    if 'like' in spans:\n+        like_elem = browser.find_elements_by_xpath(\n+            \"//a[@role='button']/span[text()='Like']/..\")\n     if len(like_elem) == 1:","path":"instapy/like_util.py","position":14,"original_position":14,"commit_id":"8c473003b0e053e82c0b602eb4c535c2b20518d9","original_commit_id":"8c473003b0e053e82c0b602eb4c535c2b20518d9","user":{"login":"douwevandermeij","id":1647984,"avatar_url":"https://avatars3.githubusercontent.com/u/1647984?v=4","gravatar_id":"","url":"https://api.github.com/users/douwevandermeij","html_url":"https://github.com/douwevandermeij","followers_url":"https://api.github.com/users/douwevandermeij/followers","following_url":"https://api.github.com/users/douwevandermeij/following{/other_user}","gists_url":"https://api.github.com/users/douwevandermeij/gists{/gist_id}","starred_url":"https://api.github.com/users/douwevandermeij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douwevandermeij/subscriptions","organizations_url":"https://api.github.com/users/douwevandermeij/orgs","repos_url":"https://api.github.com/users/douwevandermeij/repos","events_url":"https://api.github.com/users/douwevandermeij/events{/privacy}","received_events_url":"https://api.github.com/users/douwevandermeij/received_events","type":"User","site_admin":false},"body":"agree","created_at":"2018-03-19T07:52:21Z","updated_at":"2018-03-19T07:52:21Z","html_url":"https://github.com/timgrossmann/InstaPy/pull/1664#discussion_r175351292","pull_request_url":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/1664","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/comments/175351292"},"html":{"href":"https://github.com/timgrossmann/InstaPy/pull/1664#discussion_r175351292"},"pull_request":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/1664"}},"in_reply_to_id":175309759},"pull_request":{"url":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/1664","id":175644190,"html_url":"https://github.com/timgrossmann/InstaPy/pull/1664","diff_url":"https://github.com/timgrossmann/InstaPy/pull/1664.diff","patch_url":"https://github.com/timgrossmann/InstaPy/pull/1664.patch","issue_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1664","number":1664,"state":"open","locked":false,"title":"faster like button search for image liking","user":{"login":"douwevandermeij","id":1647984,"avatar_url":"https://avatars3.githubusercontent.com/u/1647984?v=4","gravatar_id":"","url":"https://api.github.com/users/douwevandermeij","html_url":"https://github.com/douwevandermeij","followers_url":"https://api.github.com/users/douwevandermeij/followers","following_url":"https://api.github.com/users/douwevandermeij/following{/other_user}","gists_url":"https://api.github.com/users/douwevandermeij/gists{/gist_id}","starred_url":"https://api.github.com/users/douwevandermeij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douwevandermeij/subscriptions","organizations_url":"https://api.github.com/users/douwevandermeij/orgs","repos_url":"https://api.github.com/users/douwevandermeij/repos","events_url":"https://api.github.com/users/douwevandermeij/events{/privacy}","received_events_url":"https://api.github.com/users/douwevandermeij/received_events","type":"User","site_admin":false},"body":"First check if there is a like or unlike button via existing spans, next find the like button if it exists, which is much faster.","created_at":"2018-03-16T20:57:20Z","updated_at":"2018-03-19T07:52:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86076a26f703face7c943cdddd57cceeac709626","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/1664/commits","review_comments_url":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/1664/comments","review_comment_url":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1664/comments","statuses_url":"https://api.github.com/repos/timgrossmann/InstaPy/statuses/8c473003b0e053e82c0b602eb4c535c2b20518d9","head":{"label":"douwevandermeij:fast-liking","ref":"fast-liking","sha":"8c473003b0e053e82c0b602eb4c535c2b20518d9","user":{"login":"douwevandermeij","id":1647984,"avatar_url":"https://avatars3.githubusercontent.com/u/1647984?v=4","gravatar_id":"","url":"https://api.github.com/users/douwevandermeij","html_url":"https://github.com/douwevandermeij","followers_url":"https://api.github.com/users/douwevandermeij/followers","following_url":"https://api.github.com/users/douwevandermeij/following{/other_user}","gists_url":"https://api.github.com/users/douwevandermeij/gists{/gist_id}","starred_url":"https://api.github.com/users/douwevandermeij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douwevandermeij/subscriptions","organizations_url":"https://api.github.com/users/douwevandermeij/orgs","repos_url":"https://api.github.com/users/douwevandermeij/repos","events_url":"https://api.github.com/users/douwevandermeij/events{/privacy}","received_events_url":"https://api.github.com/users/douwevandermeij/received_events","type":"User","site_admin":false},"repo":{"id":108905697,"name":"InstaPy","full_name":"douwevandermeij/InstaPy","owner":{"login":"douwevandermeij","id":1647984,"avatar_url":"https://avatars3.githubusercontent.com/u/1647984?v=4","gravatar_id":"","url":"https://api.github.com/users/douwevandermeij","html_url":"https://github.com/douwevandermeij","followers_url":"https://api.github.com/users/douwevandermeij/followers","following_url":"https://api.github.com/users/douwevandermeij/following{/other_user}","gists_url":"https://api.github.com/users/douwevandermeij/gists{/gist_id}","starred_url":"https://api.github.com/users/douwevandermeij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douwevandermeij/subscriptions","organizations_url":"https://api.github.com/users/douwevandermeij/orgs","repos_url":"https://api.github.com/users/douwevandermeij/repos","events_url":"https://api.github.com/users/douwevandermeij/events{/privacy}","received_events_url":"https://api.github.com/users/douwevandermeij/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/douwevandermeij/InstaPy","description":"📷 Instagram Bot - Like/Comment/Follow Automation Script","fork":true,"url":"https://api.github.com/repos/douwevandermeij/InstaPy","forks_url":"https://api.github.com/repos/douwevandermeij/InstaPy/forks","keys_url":"https://api.github.com/repos/douwevandermeij/InstaPy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/douwevandermeij/InstaPy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/douwevandermeij/InstaPy/teams","hooks_url":"https://api.github.com/repos/douwevandermeij/InstaPy/hooks","issue_events_url":"https://api.github.com/repos/douwevandermeij/InstaPy/issues/events{/number}","events_url":"https://api.github.com/repos/douwevandermeij/InstaPy/events","assignees_url":"https://api.github.com/repos/douwevandermeij/InstaPy/assignees{/user}","branches_url":"https://api.github.com/repos/douwevandermeij/InstaPy/branches{/branch}","tags_url":"https://api.github.com/repos/douwevandermeij/InstaPy/tags","blobs_url":"https://api.github.com/repos/douwevandermeij/InstaPy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/douwevandermeij/InstaPy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/douwevandermeij/InstaPy/git/refs{/sha}","trees_url":"https://api.github.com/repos/douwevandermeij/InstaPy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/douwevandermeij/InstaPy/statuses/{sha}","languages_url":"https://api.github.com/repos/douwevandermeij/InstaPy/languages","stargazers_url":"https://api.github.com/repos/douwevandermeij/InstaPy/stargazers","contributors_url":"https://api.github.com/repos/douwevandermeij/InstaPy/contributors","subscribers_url":"https://api.github.com/repos/douwevandermeij/InstaPy/subscribers","subscription_url":"https://api.github.com/repos/douwevandermeij/InstaPy/subscription","commits_url":"https://api.github.com/repos/douwevandermeij/InstaPy/commits{/sha}","git_commits_url":"https://api.github.com/repos/douwevandermeij/InstaPy/git/commits{/sha}","comments_url":"https://api.github.com/repos/douwevandermeij/InstaPy/comments{/number}","issue_comment_url":"https://api.github.com/repos/douwevandermeij/InstaPy/issues/comments{/number}","contents_url":"https://api.github.com/repos/douwevandermeij/InstaPy/contents/{+path}","compare_url":"https://api.github.com/repos/douwevandermeij/InstaPy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/douwevandermeij/InstaPy/merges","archive_url":"https://api.github.com/repos/douwevandermeij/InstaPy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/douwevandermeij/InstaPy/downloads","issues_url":"https://api.github.com/repos/douwevandermeij/InstaPy/issues{/number}","pulls_url":"https://api.github.com/repos/douwevandermeij/InstaPy/pulls{/number}","milestones_url":"https://api.github.com/repos/douwevandermeij/InstaPy/milestones{/number}","notifications_url":"https://api.github.com/repos/douwevandermeij/InstaPy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/douwevandermeij/InstaPy/labels{/name}","releases_url":"https://api.github.com/repos/douwevandermeij/InstaPy/releases{/id}","deployments_url":"https://api.github.com/repos/douwevandermeij/InstaPy/deployments","created_at":"2017-10-30T20:37:48Z","updated_at":"2018-03-17T19:29:42Z","pushed_at":"2018-03-17T19:29:41Z","git_url":"git://github.com/douwevandermeij/InstaPy.git","ssh_url":"git@github.com:douwevandermeij/InstaPy.git","clone_url":"https://github.com/douwevandermeij/InstaPy.git","svn_url":"https://github.com/douwevandermeij/InstaPy","homepage":"https://timgrossmann.github.io/InstaPy/","size":77611,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"timgrossmann:master","ref":"master","sha":"9f5af85d87785072369e21c70406b0dd065d0250","user":{"login":"timgrossmann","id":16529337,"avatar_url":"https://avatars2.githubusercontent.com/u/16529337?v=4","gravatar_id":"","url":"https://api.github.com/users/timgrossmann","html_url":"https://github.com/timgrossmann","followers_url":"https://api.github.com/users/timgrossmann/followers","following_url":"https://api.github.com/users/timgrossmann/following{/other_user}","gists_url":"https://api.github.com/users/timgrossmann/gists{/gist_id}","starred_url":"https://api.github.com/users/timgrossmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgrossmann/subscriptions","organizations_url":"https://api.github.com/users/timgrossmann/orgs","repos_url":"https://api.github.com/users/timgrossmann/repos","events_url":"https://api.github.com/users/timgrossmann/events{/privacy}","received_events_url":"https://api.github.com/users/timgrossmann/received_events","type":"User","site_admin":false},"repo":{"id":69290591,"name":"InstaPy","full_name":"timgrossmann/InstaPy","owner":{"login":"timgrossmann","id":16529337,"avatar_url":"https://avatars2.githubusercontent.com/u/16529337?v=4","gravatar_id":"","url":"https://api.github.com/users/timgrossmann","html_url":"https://github.com/timgrossmann","followers_url":"https://api.github.com/users/timgrossmann/followers","following_url":"https://api.github.com/users/timgrossmann/following{/other_user}","gists_url":"https://api.github.com/users/timgrossmann/gists{/gist_id}","starred_url":"https://api.github.com/users/timgrossmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgrossmann/subscriptions","organizations_url":"https://api.github.com/users/timgrossmann/orgs","repos_url":"https://api.github.com/users/timgrossmann/repos","events_url":"https://api.github.com/users/timgrossmann/events{/privacy}","received_events_url":"https://api.github.com/users/timgrossmann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timgrossmann/InstaPy","description":"📷 Instagram Bot - Like/Comment/Follow Automation Script","fork":false,"url":"https://api.github.com/repos/timgrossmann/InstaPy","forks_url":"https://api.github.com/repos/timgrossmann/InstaPy/forks","keys_url":"https://api.github.com/repos/timgrossmann/InstaPy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timgrossmann/InstaPy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timgrossmann/InstaPy/teams","hooks_url":"https://api.github.com/repos/timgrossmann/InstaPy/hooks","issue_events_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/events{/number}","events_url":"https://api.github.com/repos/timgrossmann/InstaPy/events","assignees_url":"https://api.github.com/repos/timgrossmann/InstaPy/assignees{/user}","branches_url":"https://api.github.com/repos/timgrossmann/InstaPy/branches{/branch}","tags_url":"https://api.github.com/repos/timgrossmann/InstaPy/tags","blobs_url":"https://api.github.com/repos/timgrossmann/InstaPy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timgrossmann/InstaPy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timgrossmann/InstaPy/git/refs{/sha}","trees_url":"https://api.github.com/repos/timgrossmann/InstaPy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timgrossmann/InstaPy/statuses/{sha}","languages_url":"https://api.github.com/repos/timgrossmann/InstaPy/languages","stargazers_url":"https://api.github.com/repos/timgrossmann/InstaPy/stargazers","contributors_url":"https://api.github.com/repos/timgrossmann/InstaPy/contributors","subscribers_url":"https://api.github.com/repos/timgrossmann/InstaPy/subscribers","subscription_url":"https://api.github.com/repos/timgrossmann/InstaPy/subscription","commits_url":"https://api.github.com/repos/timgrossmann/InstaPy/commits{/sha}","git_commits_url":"https://api.github.com/repos/timgrossmann/InstaPy/git/commits{/sha}","comments_url":"https://api.github.com/repos/timgrossmann/InstaPy/comments{/number}","issue_comment_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/comments{/number}","contents_url":"https://api.github.com/repos/timgrossmann/InstaPy/contents/{+path}","compare_url":"https://api.github.com/repos/timgrossmann/InstaPy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timgrossmann/InstaPy/merges","archive_url":"https://api.github.com/repos/timgrossmann/InstaPy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timgrossmann/InstaPy/downloads","issues_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues{/number}","pulls_url":"https://api.github.com/repos/timgrossmann/InstaPy/pulls{/number}","milestones_url":"https://api.github.com/repos/timgrossmann/InstaPy/milestones{/number}","notifications_url":"https://api.github.com/repos/timgrossmann/InstaPy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timgrossmann/InstaPy/labels{/name}","releases_url":"https://api.github.com/repos/timgrossmann/InstaPy/releases{/id}","deployments_url":"https://api.github.com/repos/timgrossmann/InstaPy/deployments","created_at":"2016-09-26T20:36:26Z","updated_at":"2018-03-19T05:22:31Z","pushed_at":"2018-03-19T00:30:01Z","git_url":"git://github.com/timgrossmann/InstaPy.git","ssh_url":"git@github.com:timgrossmann/InstaPy.git","clone_url":"https://github.com/timgrossmann/InstaPy.git","svn_url":"https://github.com/timgrossmann/InstaPy","homepage":"https://timgrossmann.github.io/InstaPy/","size":77593,"stargazers_count":3971,"watchers_count":3971,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":978,"mirror_url":null,"archived":false,"open_issues_count":554,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":978,"open_issues":554,"watchers":3971,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/1664"},"html":{"href":"https://github.com/timgrossmann/InstaPy/pull/1664"},"issue":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1664"},"comments":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1664/comments"},"review_comments":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/1664/comments"},"review_comment":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/pulls/1664/commits"},"statuses":{"href":"https://api.github.com/repos/timgrossmann/InstaPy/statuses/8c473003b0e053e82c0b602eb4c535c2b20518d9"}},"author_association":"NONE"}}
{"actor":{"display_login":"douwevandermeij"}}