{"action":"created","issue":{"url":"https://api.github.com/repos/instaloader/instaloader/issues/133","repository_url":"https://api.github.com/repos/instaloader/instaloader","labels_url":"https://api.github.com/repos/instaloader/instaloader/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/instaloader/instaloader/issues/133/comments","events_url":"https://api.github.com/repos/instaloader/instaloader/issues/133/events","html_url":"https://github.com/instaloader/instaloader/issues/133","id":330169451,"node_id":"MDU6SXNzdWUzMzAxNjk0NTE=","number":133,"title":"Instaloader problem while getting images from hashtag with Sidecar","user":{"login":"manthan340","id":4456601,"node_id":"MDQ6VXNlcjQ0NTY2MDE=","avatar_url":"https://avatars1.githubusercontent.com/u/4456601?v=4","gravatar_id":"","url":"https://api.github.com/users/manthan340","html_url":"https://github.com/manthan340","followers_url":"https://api.github.com/users/manthan340/followers","following_url":"https://api.github.com/users/manthan340/following{/other_user}","gists_url":"https://api.github.com/users/manthan340/gists{/gist_id}","starred_url":"https://api.github.com/users/manthan340/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manthan340/subscriptions","organizations_url":"https://api.github.com/users/manthan340/orgs","repos_url":"https://api.github.com/users/manthan340/repos","events_url":"https://api.github.com/users/manthan340/events{/privacy}","received_events_url":"https://api.github.com/users/manthan340/received_events","type":"User","site_admin":false},"labels":[{"id":393097482,"node_id":"MDU6TGFiZWwzOTMwOTc0ODI=","url":"https://api.github.com/repos/instaloader/instaloader/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-07T08:32:16Z","updated_at":"2018-06-07T19:15:03Z","closed_at":"2018-06-07T13:45:30Z","author_association":"NONE","body":"I am experienced PHP developer but having very basic skills in python. But I am in desparate need of using Instaloader utility. I am facing some issues in fetching all the images of perticular hashtag. The only problem is **sidecar** images. I am describing my problem in 3 approaches I have used.\r\n\r\nIf you can guide me in **Any of them**, it will solve my problem.    \r\n1. I want to extract images of particular hashtag. Images should also include all the images of _sidecar_ structure. But instaloader cli utility only fetches first photo of the sidecar. **Is there any way to get all the images from sidecar using cli utility**\r\n2. When I use python code to get all the posts of hashtag, it shows wrong post type. \r\n`for post in L.get_hashtag_posts('cloudyweather2017'):`\r\n`print(post.typename)` \r\nThis code gives me \r\n`GraphImage`\r\n`GraphImage`\r\nWhereas one of them is a sidecar. I believe this is an issue.\r\n3. In instagram PHP scraper, I found that when we get all posts using hashtag - We are not getting the sidecar images whereas if we try to fetch details of particular post - We are getting all the sidecar images. I tried to replicate the same behaviour here. But its not working. Following is the code.(P.S. I am getting too many timeouts in PHP scraper. that is why I want to use instaloader.) \r\n`from instaloader import Instaloader, Post`\r\n`L = Instaloader()`\r\n`post = Post.from_shortcode(L.context, 'BYkZsY2Avgz')`\r\n`print(post.typename)`\r\nWhen I execute this code, I am getting following error\r\n`AttributeError: 'Instaloader' object has no attribute 'context'`\r\nI have taken reference of [this example from Instaloader](https://instaloader.github.io/codesnippets.html#track-deleted-posts)\r\n"},"comment":{"url":"https://api.github.com/repos/instaloader/instaloader/issues/comments/395533633","html_url":"https://github.com/instaloader/instaloader/issues/133#issuecomment-395533633","issue_url":"https://api.github.com/repos/instaloader/instaloader/issues/133","id":395533633,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTUzMzYzMw==","user":{"login":"Thammus","id":18031384,"node_id":"MDQ6VXNlcjE4MDMxMzg0","avatar_url":"https://avatars1.githubusercontent.com/u/18031384?v=4","gravatar_id":"","url":"https://api.github.com/users/Thammus","html_url":"https://github.com/Thammus","followers_url":"https://api.github.com/users/Thammus/followers","following_url":"https://api.github.com/users/Thammus/following{/other_user}","gists_url":"https://api.github.com/users/Thammus/gists{/gist_id}","starred_url":"https://api.github.com/users/Thammus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thammus/subscriptions","organizations_url":"https://api.github.com/users/Thammus/orgs","repos_url":"https://api.github.com/users/Thammus/repos","events_url":"https://api.github.com/users/Thammus/events{/privacy}","received_events_url":"https://api.github.com/users/Thammus/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T19:15:03Z","updated_at":"2018-06-07T19:15:03Z","author_association":"MEMBER","body":"Wiith version 4.0.4 a simple invocation of Instaloader like `instaloader \"#cloudyweather2017\"` should download all targeted posts including all pictures and videos inside sidecars.\r\n\r\nAlso when using Instaloader as a module the `typename` now gets correctly determined for sidecar posts:\r\n```python\r\nimport instaloader\r\nL = instaloader.Instaloader()\r\nfor post in L.get_hashtag_posts('cloudyweather2017'):\r\n    print(\"Type of {}: {}\".format(post, post.typename))\r\n```\r\nThis code is expected to output:\r\n```\r\nType of <Post Bbuhp3Th7X6>: GraphImage\r\nType of <Post BYkZsY2Avgz>: GraphSidecar\r\n```\r\nIf you want to download the posts simply call [`L.download_post()`](https://instaloader.github.io/as-module.html#instaloader.Instaloader.download_post) from inside the loop while specifying the post object and a target string.\r\n\r\nIn the same manner the code of your third approach should work just fine."}}
{"actor":{"display_login":"Thammus"}}