{"action":"created","comment":{"url":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/comments/193200732","pull_request_review_id":126126917,"id":193200732,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzIwMDczMg==","diff_hunk":"@@ -46,6 +47,9 @@ def fix_encoding(query):\n \n def save_image(content, imagename, found=False):\n     global IMAGES\n+    already_present = os.listdir('.')\n+    if imagename in already_present:","path":"scribdl/scribdl.py","position":13,"original_position":13,"commit_id":"4a1d3632fc310f3f43ce6eaaf0a4108f4126ddc2","original_commit_id":"4a1d3632fc310f3f43ce6eaaf0a4108f4126ddc2","user":{"login":"ritiek","id":20314742,"node_id":"MDQ6VXNlcjIwMzE0NzQy","avatar_url":"https://avatars1.githubusercontent.com/u/20314742?v=4","gravatar_id":"","url":"https://api.github.com/users/ritiek","html_url":"https://github.com/ritiek","followers_url":"https://api.github.com/users/ritiek/followers","following_url":"https://api.github.com/users/ritiek/following{/other_user}","gists_url":"https://api.github.com/users/ritiek/gists{/gist_id}","starred_url":"https://api.github.com/users/ritiek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritiek/subscriptions","organizations_url":"https://api.github.com/users/ritiek/orgs","repos_url":"https://api.github.com/users/ritiek/repos","events_url":"https://api.github.com/users/ritiek/events{/privacy}","received_events_url":"https://api.github.com/users/ritiek/received_events","type":"User","site_admin":false},"body":"You're right, I get it now! Would you mind making another PR to fix this? Perhaps a better idea would be to append it right before `save_image` is called.\r\nhttps://github.com/ritiek/scribd-downloader/blob/da48df18b977c11fa885e73f139578bedba07f77/scribdl/scribdl.py#L93-L94","created_at":"2018-06-05T19:54:53Z","updated_at":"2018-06-05T19:54:53Z","html_url":"https://github.com/ritiek/scribd-downloader/pull/12#discussion_r193200732","pull_request_url":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/12","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/comments/193200732"},"html":{"href":"https://github.com/ritiek/scribd-downloader/pull/12#discussion_r193200732"},"pull_request":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/12"}},"in_reply_to_id":192983859},"pull_request":{"url":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/12","id":154604560,"node_id":"MDExOlB1bGxSZXF1ZXN0MTU0NjA0NTYw","html_url":"https://github.com/ritiek/scribd-downloader/pull/12","diff_url":"https://github.com/ritiek/scribd-downloader/pull/12.diff","patch_url":"https://github.com/ritiek/scribd-downloader/pull/12.patch","issue_url":"https://api.github.com/repos/ritiek/scribd-downloader/issues/12","number":12,"state":"closed","locked":false,"title":"Fixes #11 - prevented script from downloading already downloaded images","user":{"login":"djmgit","id":16368427,"node_id":"MDQ6VXNlcjE2MzY4NDI3","avatar_url":"https://avatars0.githubusercontent.com/u/16368427?v=4","gravatar_id":"","url":"https://api.github.com/users/djmgit","html_url":"https://github.com/djmgit","followers_url":"https://api.github.com/users/djmgit/followers","following_url":"https://api.github.com/users/djmgit/following{/other_user}","gists_url":"https://api.github.com/users/djmgit/gists{/gist_id}","starred_url":"https://api.github.com/users/djmgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djmgit/subscriptions","organizations_url":"https://api.github.com/users/djmgit/orgs","repos_url":"https://api.github.com/users/djmgit/repos","events_url":"https://api.github.com/users/djmgit/events{/privacy}","received_events_url":"https://api.github.com/users/djmgit/received_events","type":"User","site_admin":false},"body":"Fixes issue #11, before downloading an image, the script checks whether the\r\nimage is already present in the directory or not. If present, it simply\r\nprints its name but does not download it.","created_at":"2017-11-24T20:24:06Z","updated_at":"2018-06-05T19:54:53Z","closed_at":"2017-11-25T03:20:25Z","merged_at":"2017-11-25T03:20:25Z","merge_commit_sha":"dc4a34d7e3318c509aa087af9e3df96275b97976","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/12/commits","review_comments_url":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/12/comments","review_comment_url":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ritiek/scribd-downloader/issues/12/comments","statuses_url":"https://api.github.com/repos/ritiek/scribd-downloader/statuses/4a1d3632fc310f3f43ce6eaaf0a4108f4126ddc2","head":{"label":"djmgit:duplicate","ref":"duplicate","sha":"4a1d3632fc310f3f43ce6eaaf0a4108f4126ddc2","user":{"login":"djmgit","id":16368427,"node_id":"MDQ6VXNlcjE2MzY4NDI3","avatar_url":"https://avatars0.githubusercontent.com/u/16368427?v=4","gravatar_id":"","url":"https://api.github.com/users/djmgit","html_url":"https://github.com/djmgit","followers_url":"https://api.github.com/users/djmgit/followers","following_url":"https://api.github.com/users/djmgit/following{/other_user}","gists_url":"https://api.github.com/users/djmgit/gists{/gist_id}","starred_url":"https://api.github.com/users/djmgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djmgit/subscriptions","organizations_url":"https://api.github.com/users/djmgit/orgs","repos_url":"https://api.github.com/users/djmgit/repos","events_url":"https://api.github.com/users/djmgit/events{/privacy}","received_events_url":"https://api.github.com/users/djmgit/received_events","type":"User","site_admin":false},"repo":{"id":111951758,"node_id":"MDEwOlJlcG9zaXRvcnkxMTE5NTE3NTg=","name":"scribd-downloader","full_name":"djmgit/scribd-downloader","owner":{"login":"djmgit","id":16368427,"node_id":"MDQ6VXNlcjE2MzY4NDI3","avatar_url":"https://avatars0.githubusercontent.com/u/16368427?v=4","gravatar_id":"","url":"https://api.github.com/users/djmgit","html_url":"https://github.com/djmgit","followers_url":"https://api.github.com/users/djmgit/followers","following_url":"https://api.github.com/users/djmgit/following{/other_user}","gists_url":"https://api.github.com/users/djmgit/gists{/gist_id}","starred_url":"https://api.github.com/users/djmgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djmgit/subscriptions","organizations_url":"https://api.github.com/users/djmgit/orgs","repos_url":"https://api.github.com/users/djmgit/repos","events_url":"https://api.github.com/users/djmgit/events{/privacy}","received_events_url":"https://api.github.com/users/djmgit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/djmgit/scribd-downloader","description":"A scribd-downloader that actually works (although not the way you'd expect it to)","fork":true,"url":"https://api.github.com/repos/djmgit/scribd-downloader","forks_url":"https://api.github.com/repos/djmgit/scribd-downloader/forks","keys_url":"https://api.github.com/repos/djmgit/scribd-downloader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djmgit/scribd-downloader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djmgit/scribd-downloader/teams","hooks_url":"https://api.github.com/repos/djmgit/scribd-downloader/hooks","issue_events_url":"https://api.github.com/repos/djmgit/scribd-downloader/issues/events{/number}","events_url":"https://api.github.com/repos/djmgit/scribd-downloader/events","assignees_url":"https://api.github.com/repos/djmgit/scribd-downloader/assignees{/user}","branches_url":"https://api.github.com/repos/djmgit/scribd-downloader/branches{/branch}","tags_url":"https://api.github.com/repos/djmgit/scribd-downloader/tags","blobs_url":"https://api.github.com/repos/djmgit/scribd-downloader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djmgit/scribd-downloader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djmgit/scribd-downloader/git/refs{/sha}","trees_url":"https://api.github.com/repos/djmgit/scribd-downloader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djmgit/scribd-downloader/statuses/{sha}","languages_url":"https://api.github.com/repos/djmgit/scribd-downloader/languages","stargazers_url":"https://api.github.com/repos/djmgit/scribd-downloader/stargazers","contributors_url":"https://api.github.com/repos/djmgit/scribd-downloader/contributors","subscribers_url":"https://api.github.com/repos/djmgit/scribd-downloader/subscribers","subscription_url":"https://api.github.com/repos/djmgit/scribd-downloader/subscription","commits_url":"https://api.github.com/repos/djmgit/scribd-downloader/commits{/sha}","git_commits_url":"https://api.github.com/repos/djmgit/scribd-downloader/git/commits{/sha}","comments_url":"https://api.github.com/repos/djmgit/scribd-downloader/comments{/number}","issue_comment_url":"https://api.github.com/repos/djmgit/scribd-downloader/issues/comments{/number}","contents_url":"https://api.github.com/repos/djmgit/scribd-downloader/contents/{+path}","compare_url":"https://api.github.com/repos/djmgit/scribd-downloader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djmgit/scribd-downloader/merges","archive_url":"https://api.github.com/repos/djmgit/scribd-downloader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djmgit/scribd-downloader/downloads","issues_url":"https://api.github.com/repos/djmgit/scribd-downloader/issues{/number}","pulls_url":"https://api.github.com/repos/djmgit/scribd-downloader/pulls{/number}","milestones_url":"https://api.github.com/repos/djmgit/scribd-downloader/milestones{/number}","notifications_url":"https://api.github.com/repos/djmgit/scribd-downloader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djmgit/scribd-downloader/labels{/name}","releases_url":"https://api.github.com/repos/djmgit/scribd-downloader/releases{/id}","deployments_url":"https://api.github.com/repos/djmgit/scribd-downloader/deployments","created_at":"2017-11-24T19:59:34Z","updated_at":"2017-11-24T19:59:36Z","pushed_at":"2017-11-25T03:12:43Z","git_url":"git://github.com/djmgit/scribd-downloader.git","ssh_url":"git@github.com:djmgit/scribd-downloader.git","clone_url":"https://github.com/djmgit/scribd-downloader.git","svn_url":"https://github.com/djmgit/scribd-downloader","homepage":"","size":30,"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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ritiek:master","ref":"master","sha":"f34c25c69ecdb54a88acbeeb7c510b2dc9a92635","user":{"login":"ritiek","id":20314742,"node_id":"MDQ6VXNlcjIwMzE0NzQy","avatar_url":"https://avatars1.githubusercontent.com/u/20314742?v=4","gravatar_id":"","url":"https://api.github.com/users/ritiek","html_url":"https://github.com/ritiek","followers_url":"https://api.github.com/users/ritiek/followers","following_url":"https://api.github.com/users/ritiek/following{/other_user}","gists_url":"https://api.github.com/users/ritiek/gists{/gist_id}","starred_url":"https://api.github.com/users/ritiek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritiek/subscriptions","organizations_url":"https://api.github.com/users/ritiek/orgs","repos_url":"https://api.github.com/users/ritiek/repos","events_url":"https://api.github.com/users/ritiek/events{/privacy}","received_events_url":"https://api.github.com/users/ritiek/received_events","type":"User","site_admin":false},"repo":{"id":74484052,"node_id":"MDEwOlJlcG9zaXRvcnk3NDQ4NDA1Mg==","name":"scribd-downloader","full_name":"ritiek/scribd-downloader","owner":{"login":"ritiek","id":20314742,"node_id":"MDQ6VXNlcjIwMzE0NzQy","avatar_url":"https://avatars1.githubusercontent.com/u/20314742?v=4","gravatar_id":"","url":"https://api.github.com/users/ritiek","html_url":"https://github.com/ritiek","followers_url":"https://api.github.com/users/ritiek/followers","following_url":"https://api.github.com/users/ritiek/following{/other_user}","gists_url":"https://api.github.com/users/ritiek/gists{/gist_id}","starred_url":"https://api.github.com/users/ritiek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritiek/subscriptions","organizations_url":"https://api.github.com/users/ritiek/orgs","repos_url":"https://api.github.com/users/ritiek/repos","events_url":"https://api.github.com/users/ritiek/events{/privacy}","received_events_url":"https://api.github.com/users/ritiek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ritiek/scribd-downloader","description":"A scribd-downloader that actually works (although not the way you'd expect it to)","fork":false,"url":"https://api.github.com/repos/ritiek/scribd-downloader","forks_url":"https://api.github.com/repos/ritiek/scribd-downloader/forks","keys_url":"https://api.github.com/repos/ritiek/scribd-downloader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ritiek/scribd-downloader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ritiek/scribd-downloader/teams","hooks_url":"https://api.github.com/repos/ritiek/scribd-downloader/hooks","issue_events_url":"https://api.github.com/repos/ritiek/scribd-downloader/issues/events{/number}","events_url":"https://api.github.com/repos/ritiek/scribd-downloader/events","assignees_url":"https://api.github.com/repos/ritiek/scribd-downloader/assignees{/user}","branches_url":"https://api.github.com/repos/ritiek/scribd-downloader/branches{/branch}","tags_url":"https://api.github.com/repos/ritiek/scribd-downloader/tags","blobs_url":"https://api.github.com/repos/ritiek/scribd-downloader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ritiek/scribd-downloader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ritiek/scribd-downloader/git/refs{/sha}","trees_url":"https://api.github.com/repos/ritiek/scribd-downloader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ritiek/scribd-downloader/statuses/{sha}","languages_url":"https://api.github.com/repos/ritiek/scribd-downloader/languages","stargazers_url":"https://api.github.com/repos/ritiek/scribd-downloader/stargazers","contributors_url":"https://api.github.com/repos/ritiek/scribd-downloader/contributors","subscribers_url":"https://api.github.com/repos/ritiek/scribd-downloader/subscribers","subscription_url":"https://api.github.com/repos/ritiek/scribd-downloader/subscription","commits_url":"https://api.github.com/repos/ritiek/scribd-downloader/commits{/sha}","git_commits_url":"https://api.github.com/repos/ritiek/scribd-downloader/git/commits{/sha}","comments_url":"https://api.github.com/repos/ritiek/scribd-downloader/comments{/number}","issue_comment_url":"https://api.github.com/repos/ritiek/scribd-downloader/issues/comments{/number}","contents_url":"https://api.github.com/repos/ritiek/scribd-downloader/contents/{+path}","compare_url":"https://api.github.com/repos/ritiek/scribd-downloader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ritiek/scribd-downloader/merges","archive_url":"https://api.github.com/repos/ritiek/scribd-downloader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ritiek/scribd-downloader/downloads","issues_url":"https://api.github.com/repos/ritiek/scribd-downloader/issues{/number}","pulls_url":"https://api.github.com/repos/ritiek/scribd-downloader/pulls{/number}","milestones_url":"https://api.github.com/repos/ritiek/scribd-downloader/milestones{/number}","notifications_url":"https://api.github.com/repos/ritiek/scribd-downloader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ritiek/scribd-downloader/labels{/name}","releases_url":"https://api.github.com/repos/ritiek/scribd-downloader/releases{/id}","deployments_url":"https://api.github.com/repos/ritiek/scribd-downloader/deployments","created_at":"2016-11-22T15:06:01Z","updated_at":"2018-06-04T23:17:46Z","pushed_at":"2018-05-05T12:41:30Z","git_url":"git://github.com/ritiek/scribd-downloader.git","ssh_url":"git@github.com:ritiek/scribd-downloader.git","clone_url":"https://github.com/ritiek/scribd-downloader.git","svn_url":"https://github.com/ritiek/scribd-downloader","homepage":"","size":35,"stargazers_count":94,"watchers_count":94,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":14,"open_issues":3,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/12"},"html":{"href":"https://github.com/ritiek/scribd-downloader/pull/12"},"issue":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/issues/12"},"comments":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/ritiek/scribd-downloader/statuses/4a1d3632fc310f3f43ce6eaaf0a4108f4126ddc2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ritiek"}}