{"action":"created","comment":{"url":"https://api.github.com/repos/sealemar/BingRewards/pulls/comments/27754999","id":27754999,"diff_hunk":"@@ -311,6 +317,42 @@ def __processSearch(self, reward):\n             else:\n                 successfullQueries += 1\n \n+                # randomly open a link\n+                if self.openLinkChance > random.random():\n+                    # get IG number\n+                    ig_number = IG_NUMBER_PATTERN.search(page)\n+                    if ig_number != None:\n+                        ig_number = ig_number.group(1)\n+                        # get search results\n+                        ig_results = IG_SEARCH_RESULTS_PATTER.search(page)\n+                        if ig_results != None:\n+                            ig_results = ig_results.group(1)\n+                            # seperate search results\n+                            ig_searches = IG_SEARCHS_PATTERN.findall(ig_results)\n+                            # get a random link to open\n+                            ig_max_rand = min(self.openTopLinkRange, len(ig_searches) - 1)\n+                            ig_link_num = random.randint(0, ig_max_rand)\n+                            # number of the link we will use\n+                            ig_link = \"http://www.bing.com/fd/ls/GLinkPing.aspx?IG={0}&{1}\".format(\n+                                urllib.quote_plus(ig_number),\n+                                urllib.quote_plus(ig_searches[ig_link_num][1])\n+                            )\n+\n+                            # sleep a random time\n+                            t = random.uniform(0.75, 3.0)","path":"pkg/bingRewards.py","position":79,"original_position":79,"commit_id":"11b45ee0c473d4b2a6cade39b7d2c5d436ff6488","original_commit_id":"11b45ee0c473d4b2a6cade39b7d2c5d436ff6488","user":{"login":"sealemar","id":2381741,"avatar_url":"https://avatars.githubusercontent.com/u/2381741?v=3","gravatar_id":"","url":"https://api.github.com/users/sealemar","html_url":"https://github.com/sealemar","followers_url":"https://api.github.com/users/sealemar/followers","following_url":"https://api.github.com/users/sealemar/following{/other_user}","gists_url":"https://api.github.com/users/sealemar/gists{/gist_id}","starred_url":"https://api.github.com/users/sealemar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sealemar/subscriptions","organizations_url":"https://api.github.com/users/sealemar/orgs","repos_url":"https://api.github.com/users/sealemar/repos","events_url":"https://api.github.com/users/sealemar/events{/privacy}","received_events_url":"https://api.github.com/users/sealemar/received_events","type":"User","site_admin":false},"body":"do you want to have it configurable?","created_at":"2015-04-03T20:51:37Z","updated_at":"2015-04-03T20:51:37Z","html_url":"https://github.com/sealemar/BingRewards/pull/128#discussion_r27754999","pull_request_url":"https://api.github.com/repos/sealemar/BingRewards/pulls/128","_links":{"self":{"href":"https://api.github.com/repos/sealemar/BingRewards/pulls/comments/27754999"},"html":{"href":"https://github.com/sealemar/BingRewards/pull/128#discussion_r27754999"},"pull_request":{"href":"https://api.github.com/repos/sealemar/BingRewards/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/sealemar/BingRewards/pulls/128","id":32144841,"html_url":"https://github.com/sealemar/BingRewards/pull/128","diff_url":"https://github.com/sealemar/BingRewards/pull/128.diff","patch_url":"https://github.com/sealemar/BingRewards/pull/128.patch","issue_url":"https://api.github.com/repos/sealemar/BingRewards/issues/128","number":128,"state":"open","locked":false,"title":"Randomly Open Link After Search Query","user":{"login":"amayer5125","id":3212673,"avatar_url":"https://avatars.githubusercontent.com/u/3212673?v=3","gravatar_id":"","url":"https://api.github.com/users/amayer5125","html_url":"https://github.com/amayer5125","followers_url":"https://api.github.com/users/amayer5125/followers","following_url":"https://api.github.com/users/amayer5125/following{/other_user}","gists_url":"https://api.github.com/users/amayer5125/gists{/gist_id}","starred_url":"https://api.github.com/users/amayer5125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amayer5125/subscriptions","organizations_url":"https://api.github.com/users/amayer5125/orgs","repos_url":"https://api.github.com/users/amayer5125/repos","events_url":"https://api.github.com/users/amayer5125/events{/privacy}","received_events_url":"https://api.github.com/users/amayer5125/received_events","type":"User","site_admin":false},"body":"Based heavily on work by @iRobie\r\nRoll random to see if search is necessary\r\nRoll random to choose link to click\r\nTell Bing we opened the link","created_at":"2015-03-27T21:04:16Z","updated_at":"2015-04-03T20:51:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d0b0b83a3cdb8d10caea5b40754ab073fef81eb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sealemar/BingRewards/pulls/128/commits","review_comments_url":"https://api.github.com/repos/sealemar/BingRewards/pulls/128/comments","review_comment_url":"https://api.github.com/repos/sealemar/BingRewards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sealemar/BingRewards/issues/128/comments","statuses_url":"https://api.github.com/repos/sealemar/BingRewards/statuses/11b45ee0c473d4b2a6cade39b7d2c5d436ff6488","head":{"label":"amayer5125:rand_link","ref":"rand_link","sha":"11b45ee0c473d4b2a6cade39b7d2c5d436ff6488","user":{"login":"amayer5125","id":3212673,"avatar_url":"https://avatars.githubusercontent.com/u/3212673?v=3","gravatar_id":"","url":"https://api.github.com/users/amayer5125","html_url":"https://github.com/amayer5125","followers_url":"https://api.github.com/users/amayer5125/followers","following_url":"https://api.github.com/users/amayer5125/following{/other_user}","gists_url":"https://api.github.com/users/amayer5125/gists{/gist_id}","starred_url":"https://api.github.com/users/amayer5125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amayer5125/subscriptions","organizations_url":"https://api.github.com/users/amayer5125/orgs","repos_url":"https://api.github.com/users/amayer5125/repos","events_url":"https://api.github.com/users/amayer5125/events{/privacy}","received_events_url":"https://api.github.com/users/amayer5125/received_events","type":"User","site_admin":false},"repo":{"id":22354820,"name":"BingRewards","full_name":"amayer5125/BingRewards","owner":{"login":"amayer5125","id":3212673,"avatar_url":"https://avatars.githubusercontent.com/u/3212673?v=3","gravatar_id":"","url":"https://api.github.com/users/amayer5125","html_url":"https://github.com/amayer5125","followers_url":"https://api.github.com/users/amayer5125/followers","following_url":"https://api.github.com/users/amayer5125/following{/other_user}","gists_url":"https://api.github.com/users/amayer5125/gists{/gist_id}","starred_url":"https://api.github.com/users/amayer5125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amayer5125/subscriptions","organizations_url":"https://api.github.com/users/amayer5125/orgs","repos_url":"https://api.github.com/users/amayer5125/repos","events_url":"https://api.github.com/users/amayer5125/events{/privacy}","received_events_url":"https://api.github.com/users/amayer5125/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amayer5125/BingRewards","description":"Bing! Rewards Automation script - earn rewards automatically","fork":true,"url":"https://api.github.com/repos/amayer5125/BingRewards","forks_url":"https://api.github.com/repos/amayer5125/BingRewards/forks","keys_url":"https://api.github.com/repos/amayer5125/BingRewards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amayer5125/BingRewards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amayer5125/BingRewards/teams","hooks_url":"https://api.github.com/repos/amayer5125/BingRewards/hooks","issue_events_url":"https://api.github.com/repos/amayer5125/BingRewards/issues/events{/number}","events_url":"https://api.github.com/repos/amayer5125/BingRewards/events","assignees_url":"https://api.github.com/repos/amayer5125/BingRewards/assignees{/user}","branches_url":"https://api.github.com/repos/amayer5125/BingRewards/branches{/branch}","tags_url":"https://api.github.com/repos/amayer5125/BingRewards/tags","blobs_url":"https://api.github.com/repos/amayer5125/BingRewards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amayer5125/BingRewards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amayer5125/BingRewards/git/refs{/sha}","trees_url":"https://api.github.com/repos/amayer5125/BingRewards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amayer5125/BingRewards/statuses/{sha}","languages_url":"https://api.github.com/repos/amayer5125/BingRewards/languages","stargazers_url":"https://api.github.com/repos/amayer5125/BingRewards/stargazers","contributors_url":"https://api.github.com/repos/amayer5125/BingRewards/contributors","subscribers_url":"https://api.github.com/repos/amayer5125/BingRewards/subscribers","subscription_url":"https://api.github.com/repos/amayer5125/BingRewards/subscription","commits_url":"https://api.github.com/repos/amayer5125/BingRewards/commits{/sha}","git_commits_url":"https://api.github.com/repos/amayer5125/BingRewards/git/commits{/sha}","comments_url":"https://api.github.com/repos/amayer5125/BingRewards/comments{/number}","issue_comment_url":"https://api.github.com/repos/amayer5125/BingRewards/issues/comments{/number}","contents_url":"https://api.github.com/repos/amayer5125/BingRewards/contents/{+path}","compare_url":"https://api.github.com/repos/amayer5125/BingRewards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amayer5125/BingRewards/merges","archive_url":"https://api.github.com/repos/amayer5125/BingRewards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amayer5125/BingRewards/downloads","issues_url":"https://api.github.com/repos/amayer5125/BingRewards/issues{/number}","pulls_url":"https://api.github.com/repos/amayer5125/BingRewards/pulls{/number}","milestones_url":"https://api.github.com/repos/amayer5125/BingRewards/milestones{/number}","notifications_url":"https://api.github.com/repos/amayer5125/BingRewards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amayer5125/BingRewards/labels{/name}","releases_url":"https://api.github.com/repos/amayer5125/BingRewards/releases{/id}","created_at":"2014-07-28T19:21:08Z","updated_at":"2015-03-27T19:06:04Z","pushed_at":"2015-03-30T20:27:34Z","git_url":"git://github.com/amayer5125/BingRewards.git","ssh_url":"git@github.com:amayer5125/BingRewards.git","clone_url":"https://github.com/amayer5125/BingRewards.git","svn_url":"https://github.com/amayer5125/BingRewards","homepage":"http://sealemar.blogspot.com/2013/10/bing-rewards-automation-version-30.html","size":465,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sealemar:master","ref":"master","sha":"367100cedea2273664d6be186db0508ae68a5ff9","user":{"login":"sealemar","id":2381741,"avatar_url":"https://avatars.githubusercontent.com/u/2381741?v=3","gravatar_id":"","url":"https://api.github.com/users/sealemar","html_url":"https://github.com/sealemar","followers_url":"https://api.github.com/users/sealemar/followers","following_url":"https://api.github.com/users/sealemar/following{/other_user}","gists_url":"https://api.github.com/users/sealemar/gists{/gist_id}","starred_url":"https://api.github.com/users/sealemar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sealemar/subscriptions","organizations_url":"https://api.github.com/users/sealemar/orgs","repos_url":"https://api.github.com/users/sealemar/repos","events_url":"https://api.github.com/users/sealemar/events{/privacy}","received_events_url":"https://api.github.com/users/sealemar/received_events","type":"User","site_admin":false},"repo":{"id":6715355,"name":"BingRewards","full_name":"sealemar/BingRewards","owner":{"login":"sealemar","id":2381741,"avatar_url":"https://avatars.githubusercontent.com/u/2381741?v=3","gravatar_id":"","url":"https://api.github.com/users/sealemar","html_url":"https://github.com/sealemar","followers_url":"https://api.github.com/users/sealemar/followers","following_url":"https://api.github.com/users/sealemar/following{/other_user}","gists_url":"https://api.github.com/users/sealemar/gists{/gist_id}","starred_url":"https://api.github.com/users/sealemar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sealemar/subscriptions","organizations_url":"https://api.github.com/users/sealemar/orgs","repos_url":"https://api.github.com/users/sealemar/repos","events_url":"https://api.github.com/users/sealemar/events{/privacy}","received_events_url":"https://api.github.com/users/sealemar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sealemar/BingRewards","description":"Bing! Rewards Automation script - earn rewards automatically","fork":false,"url":"https://api.github.com/repos/sealemar/BingRewards","forks_url":"https://api.github.com/repos/sealemar/BingRewards/forks","keys_url":"https://api.github.com/repos/sealemar/BingRewards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sealemar/BingRewards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sealemar/BingRewards/teams","hooks_url":"https://api.github.com/repos/sealemar/BingRewards/hooks","issue_events_url":"https://api.github.com/repos/sealemar/BingRewards/issues/events{/number}","events_url":"https://api.github.com/repos/sealemar/BingRewards/events","assignees_url":"https://api.github.com/repos/sealemar/BingRewards/assignees{/user}","branches_url":"https://api.github.com/repos/sealemar/BingRewards/branches{/branch}","tags_url":"https://api.github.com/repos/sealemar/BingRewards/tags","blobs_url":"https://api.github.com/repos/sealemar/BingRewards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sealemar/BingRewards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sealemar/BingRewards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sealemar/BingRewards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sealemar/BingRewards/statuses/{sha}","languages_url":"https://api.github.com/repos/sealemar/BingRewards/languages","stargazers_url":"https://api.github.com/repos/sealemar/BingRewards/stargazers","contributors_url":"https://api.github.com/repos/sealemar/BingRewards/contributors","subscribers_url":"https://api.github.com/repos/sealemar/BingRewards/subscribers","subscription_url":"https://api.github.com/repos/sealemar/BingRewards/subscription","commits_url":"https://api.github.com/repos/sealemar/BingRewards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sealemar/BingRewards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sealemar/BingRewards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sealemar/BingRewards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sealemar/BingRewards/contents/{+path}","compare_url":"https://api.github.com/repos/sealemar/BingRewards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sealemar/BingRewards/merges","archive_url":"https://api.github.com/repos/sealemar/BingRewards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sealemar/BingRewards/downloads","issues_url":"https://api.github.com/repos/sealemar/BingRewards/issues{/number}","pulls_url":"https://api.github.com/repos/sealemar/BingRewards/pulls{/number}","milestones_url":"https://api.github.com/repos/sealemar/BingRewards/milestones{/number}","notifications_url":"https://api.github.com/repos/sealemar/BingRewards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sealemar/BingRewards/labels{/name}","releases_url":"https://api.github.com/repos/sealemar/BingRewards/releases{/id}","created_at":"2012-11-16T02:32:17Z","updated_at":"2015-04-03T20:39:17Z","pushed_at":"2015-04-03T20:39:17Z","git_url":"git://github.com/sealemar/BingRewards.git","ssh_url":"git@github.com:sealemar/BingRewards.git","clone_url":"https://github.com/sealemar/BingRewards.git","svn_url":"https://github.com/sealemar/BingRewards","homepage":"http://sealemar.blogspot.com/2013/10/bing-rewards-automation-version-30.html","size":1135,"stargazers_count":86,"watchers_count":86,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":5,"forks":54,"open_issues":5,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sealemar/BingRewards/pulls/128"},"html":{"href":"https://github.com/sealemar/BingRewards/pull/128"},"issue":{"href":"https://api.github.com/repos/sealemar/BingRewards/issues/128"},"comments":{"href":"https://api.github.com/repos/sealemar/BingRewards/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/sealemar/BingRewards/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/sealemar/BingRewards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sealemar/BingRewards/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/sealemar/BingRewards/statuses/11b45ee0c473d4b2a6cade39b7d2c5d436ff6488"}}}}