{"action":"created","issue":{"url":"https://api.github.com/repos/alberanid/imdbpy/issues/146","repository_url":"https://api.github.com/repos/alberanid/imdbpy","labels_url":"https://api.github.com/repos/alberanid/imdbpy/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/alberanid/imdbpy/issues/146/comments","events_url":"https://api.github.com/repos/alberanid/imdbpy/issues/146/events","html_url":"https://github.com/alberanid/imdbpy/issues/146","id":312559684,"number":146,"title":"'full-size cover url' key is a very small preview","user":{"login":"futal","id":4118740,"avatar_url":"https://avatars1.githubusercontent.com/u/4118740?v=4","gravatar_id":"","url":"https://api.github.com/users/futal","html_url":"https://github.com/futal","followers_url":"https://api.github.com/users/futal/followers","following_url":"https://api.github.com/users/futal/following{/other_user}","gists_url":"https://api.github.com/users/futal/gists{/gist_id}","starred_url":"https://api.github.com/users/futal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futal/subscriptions","organizations_url":"https://api.github.com/users/futal/orgs","repos_url":"https://api.github.com/users/futal/repos","events_url":"https://api.github.com/users/futal/events{/privacy}","received_events_url":"https://api.github.com/users/futal/received_events","type":"User","site_admin":false},"labels":[{"id":348634140,"url":"https://api.github.com/repos/alberanid/imdbpy/labels/bug","name":"bug","color":"b60205","default":true},{"id":348634648,"url":"https://api.github.com/repos/alberanid/imdbpy/labels/http","name":"http","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":{"login":"alberanid","id":222857,"avatar_url":"https://avatars1.githubusercontent.com/u/222857?v=4","gravatar_id":"","url":"https://api.github.com/users/alberanid","html_url":"https://github.com/alberanid","followers_url":"https://api.github.com/users/alberanid/followers","following_url":"https://api.github.com/users/alberanid/following{/other_user}","gists_url":"https://api.github.com/users/alberanid/gists{/gist_id}","starred_url":"https://api.github.com/users/alberanid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alberanid/subscriptions","organizations_url":"https://api.github.com/users/alberanid/orgs","repos_url":"https://api.github.com/users/alberanid/repos","events_url":"https://api.github.com/users/alberanid/events{/privacy}","received_events_url":"https://api.github.com/users/alberanid/received_events","type":"User","site_admin":false},"assignees":[{"login":"alberanid","id":222857,"avatar_url":"https://avatars1.githubusercontent.com/u/222857?v=4","gravatar_id":"","url":"https://api.github.com/users/alberanid","html_url":"https://github.com/alberanid","followers_url":"https://api.github.com/users/alberanid/followers","following_url":"https://api.github.com/users/alberanid/following{/other_user}","gists_url":"https://api.github.com/users/alberanid/gists{/gist_id}","starred_url":"https://api.github.com/users/alberanid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alberanid/subscriptions","organizations_url":"https://api.github.com/users/alberanid/orgs","repos_url":"https://api.github.com/users/alberanid/repos","events_url":"https://api.github.com/users/alberanid/events{/privacy}","received_events_url":"https://api.github.com/users/alberanid/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-04-09T14:42:21Z","updated_at":"2018-04-11T20:48:18Z","closed_at":"2018-04-10T22:03:37Z","author_association":"NONE","body":"#### Issue description\r\n\r\n`'full-size cover url'`-key reference a very small image, typically 101x150 pixels. This does not look like full-size. A link to a larger image is expected.\r\n\r\n#### Version of IMDbPY, Python and OS\r\n\r\n- **Python: 3.5.3**\r\n- **IMDbPY: 6.4.1**\r\n- **OS: Linux 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64**\r\n\r\n#### Steps to reproduce the issue\r\n\r\n```\r\n>>> the_matrix = ia.get_movie('0133093')\r\n>>> the_matrix['full-size cover url']\r\n'https://ia.media-imdb.com/images/M/MV5BNzQzOTk3OTAtNDQ0Zi00ZTVkLWI0MTEtMDllZjNkYzNjNTc4L2ltYWdlXkEyXkFqcGdeQXVyNjU0OTQ0OTY@._V1_SX101_CR0,0,101,150_.jpg'\r\n```\r\n\r\nThe image is very small: 101x150 pixels. I did not figure out where this URL was extracted from. The image displayed on IMDb is 182x268. A link showing a much larger image is given in the `<head>` section of the html page.\r\n\r\nComparing the different image URLs, you can notice that the end of the URL defines the image size and cropping size. For example in `@._V1_UY1200_CR84,0,630,1200_AL_.jpg`:\r\n\r\n * `V1` has an unknown meaning. You get the same image with `V2`, `V3`, etc.\r\n * `U` has an unknown meaning. Here it works as well with `S` while other letters seem to deactivate resizing.\r\n * `Y1200` defines that the poster will be resized to a height of 1200 px. You can define that the poster be resize to a given width with `X` instead of `Y`.\r\n * `CR84,0,630,1200` defines the cropping area. The last two numbers define the width and height of the resulting image (here the full height of the poster is displayed). The first two numbers define how much the cropping area is shifted to the right/bottom. Shifting to the bottom as a meaning only if the image height is smaller than the original poster height (no meaning here as both are 1200 pixels). Shifting to the right as a meaning only if the image width is smaller than the original poster width (here it has a meaning because the image is 630 pixel wide while the poster would be 798 pixel wide for the selected 1200 pixel height). I have only been able to figure the actual poster width (798 pixel for a 1200 px height) with trials and errors.\r\n * `AL_` has an unknown meaning. It works without.\r\n\r\nIt would make sense to link to an image with more pixels, for example 1200 pixel high. However I don't know how to determine the actual poster width for a given height. Here the expected result would:\r\n\r\n```\r\n>>> the_matrix = ia.get_movie('0133093')\r\n>>> the_matrix['full-size cover url']\r\n'https://ia.media-imdb.com/images/M/MV5BNzQzOTk3OTAtNDQ0Zi00ZTVkLWI0MTEtMDllZjNkYzNjNTc4L2ltYWdlXkEyXkFqcGdeQXVyNjU0OTQ0OTY@._V1_UY1200_CR0,0,798,1200_.jpg'\r\n```"},"comment":{"url":"https://api.github.com/repos/alberanid/imdbpy/issues/comments/380590663","html_url":"https://github.com/alberanid/imdbpy/issues/146#issuecomment-380590663","issue_url":"https://api.github.com/repos/alberanid/imdbpy/issues/146","id":380590663,"user":{"login":"bradpirtle","id":2924095,"avatar_url":"https://avatars0.githubusercontent.com/u/2924095?v=4","gravatar_id":"","url":"https://api.github.com/users/bradpirtle","html_url":"https://github.com/bradpirtle","followers_url":"https://api.github.com/users/bradpirtle/followers","following_url":"https://api.github.com/users/bradpirtle/following{/other_user}","gists_url":"https://api.github.com/users/bradpirtle/gists{/gist_id}","starred_url":"https://api.github.com/users/bradpirtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradpirtle/subscriptions","organizations_url":"https://api.github.com/users/bradpirtle/orgs","repos_url":"https://api.github.com/users/bradpirtle/repos","events_url":"https://api.github.com/users/bradpirtle/events{/privacy}","received_events_url":"https://api.github.com/users/bradpirtle/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T20:48:17Z","updated_at":"2018-04-11T20:48:17Z","author_association":"NONE","body":"You need to preserve the @'s if there is more than one (for some reason).\r\nThe comments suggestions work:\r\n\r\n`url = url[:url.rindex('@')+1]`\r\n\r\nbut the code that was signed in does not: (38aef8e)\r\n\r\n` _re_fullsizeURL = re.compile(r'(?<=@).*?$')`\r\n\r\nThis takes everything from the right of the \"first\" @, not the \"last\".\r\n\r\nExample with 2 @'s:\r\nhttp://www.imdb.com/title/tt6624126/\r\nhttps://ia.media-imdb.com/images/M/MV5BNThmYzMxYmYtMTc3Ny00NTVlLWI1NWQtNmJiNWJhZDBiZDkyXkEyXkFqcGdeQXVyMTAzNDg1MA@@._V1_SY1000_CR0,0,659,1000_AL_.jpg\r\n\r\nThis gives a 404:\r\nhttps://ia.media-imdb.com/images/M/MV5BNThmYzMxYmYtMTc3Ny00NTVlLWI1NWQtNmJiNWJhZDBiZDkyXkEyXkFqcGdeQXVyMTAzNDg1MA@\r\n\r\nThis works (even without the extension):\r\nhttps://ia.media-imdb.com/images/M/MV5BNThmYzMxYmYtMTc3Ny00NTVlLWI1NWQtNmJiNWJhZDBiZDkyXkEyXkFqcGdeQXVyMTAzNDg1MA@@\r\n\r\nI dont have any examples that dont work without extension, but a failsafe fix should probably preserve that.\r\nFYI."}}
{"actor":{"display_login":"bradpirtle"}}