{"action":"created","issue":{"url":"https://api.github.com/repos/beetbox/beets/issues/2718","repository_url":"https://api.github.com/repos/beetbox/beets","labels_url":"https://api.github.com/repos/beetbox/beets/issues/2718/labels{/name}","comments_url":"https://api.github.com/repos/beetbox/beets/issues/2718/comments","events_url":"https://api.github.com/repos/beetbox/beets/issues/2718/events","html_url":"https://github.com/beetbox/beets/pull/2718","id":268886431,"node_id":"MDExOlB1bGxSZXF1ZXN0MTQ5MDI2OTMx","number":2718,"title":"fetchart: Restore iTunes Store source","user":{"login":"nathdwek","id":5646609,"node_id":"MDQ6VXNlcjU2NDY2MDk=","avatar_url":"https://avatars2.githubusercontent.com/u/5646609?v=4","gravatar_id":"","url":"https://api.github.com/users/nathdwek","html_url":"https://github.com/nathdwek","followers_url":"https://api.github.com/users/nathdwek/followers","following_url":"https://api.github.com/users/nathdwek/following{/other_user}","gists_url":"https://api.github.com/users/nathdwek/gists{/gist_id}","starred_url":"https://api.github.com/users/nathdwek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathdwek/subscriptions","organizations_url":"https://api.github.com/users/nathdwek/orgs","repos_url":"https://api.github.com/users/nathdwek/repos","events_url":"https://api.github.com/users/nathdwek/events{/privacy}","received_events_url":"https://api.github.com/users/nathdwek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-10-26T19:41:15Z","updated_at":"2018-08-15T15:35:23Z","closed_at":"2018-08-15T14:34:07Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/beetbox/beets/pulls/2718","html_url":"https://github.com/beetbox/beets/pull/2718","diff_url":"https://github.com/beetbox/beets/pull/2718.diff","patch_url":"https://github.com/beetbox/beets/pull/2718.patch"},"body":"This is a tentative at addressing #2551 . For the moment this is very much a work in progress, but I would like to discuss some points.\r\n\r\nFor the moment I took python-itunes from @ocelma, stripped it of some unnecessary stuff and fixed some stuff to make python3 compatible.\r\n\r\nOpen questions are:\r\n* Place in the beetbox universe: I do not really see us maintaining this for anyone's else purpose than ours. I would like to strip the code down even more so that it is as as simple and minimalistic as required to fetch the images, nothing else. Keeping it inside beets gives us some more freedom in terms of interface.\r\n* Licensing/recognition: python-itunes is GPL. I removed all the comments at the top of the file for the moment, but only to be able to remove clutter, for my own sanity when reading the code. I think even outside of licensing issues we should give some recognition to the original author(s).\r\n\r\nTo fix:\r\n* Some pep8 and long lines\r\n* Python2-3 compat: I think key issues will be urllib and strings when dealing with requests/responses\r\n* Remove a ton of unnecessary getters and unneeded complexity\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/beetbox/beets/issues/comments/413236784","html_url":"https://github.com/beetbox/beets/pull/2718#issuecomment-413236784","issue_url":"https://api.github.com/repos/beetbox/beets/issues/2718","id":413236784,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzIzNjc4NA==","user":{"login":"nathdwek","id":5646609,"node_id":"MDQ6VXNlcjU2NDY2MDk=","avatar_url":"https://avatars2.githubusercontent.com/u/5646609?v=4","gravatar_id":"","url":"https://api.github.com/users/nathdwek","html_url":"https://github.com/nathdwek","followers_url":"https://api.github.com/users/nathdwek/followers","following_url":"https://api.github.com/users/nathdwek/following{/other_user}","gists_url":"https://api.github.com/users/nathdwek/gists{/gist_id}","starred_url":"https://api.github.com/users/nathdwek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathdwek/subscriptions","organizations_url":"https://api.github.com/users/nathdwek/orgs","repos_url":"https://api.github.com/users/nathdwek/repos","events_url":"https://api.github.com/users/nathdwek/events{/privacy}","received_events_url":"https://api.github.com/users/nathdwek/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T15:35:23Z","updated_at":"2018-08-15T15:35:23Z","author_association":"MEMBER","body":"Correction: I actually made a typo when mashing my keyboard to test the rate limiting.\r\nI wanted to see what status code would be emitted when triggering the rate limiting using the following:\r\n```\r\nimport requests\r\n\r\nwhile True:\r\n    try:\r\n        r = requests.get('https://itunes.apple.com/search', params={\r\n            'term': 'Pink Floyd Meddle',\r\n            'entity': 'album',\r\n            'media': 'music'\r\n        })\r\n        print(r.status_code)\r\n        r.raise_for_status()\r\n    except requests.RequestException as e:\r\n        print(e)\r\n        break\r\n```\r\nI can't seem to reach the limit even when letting it loop for 10 minutes straight.\r\n\r\nYou could try it out on your side, but I think for the moment we can leave it at that."}}
{"actor":{"display_login":"nathdwek"}}