Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[instagram] Add support for stories #371

Merged
merged 3 commits into from
Aug 5, 2019
Merged

[instagram] Add support for stories #371

merged 3 commits into from
Aug 5, 2019

Conversation

iamleot
Copy link
Contributor

@iamleot iamleot commented Aug 5, 2019

Add support for Instagram user's stories
(https://www.instagram.com/stories//).

First the shared_data in instagram.com/stories/ is fetched in
order to retrieve the user_id that is then passed to fetch the stories
via the corresponding graphql query.

Please note that fetching stories is supported only when authentication
is enabled and the corresponding is followed.

Add support for Instagram user's stories
(https://www.instagram.com/stories/<username>/).

First the shared_data in instagram.com/stories/<username> is fetched in
order to retrieve the user_id that is then passed to fetch the stories
via the corresponding graphql query.

Please note that fetching stories is supported only when authentication
is enabled and the corresponding <username> is followed.
gallery_dl/extractor/instagram.py Show resolved Hide resolved
# If there are stories present but the user is not authenticated or
# does not have permissions no stories are returned.
if not shared_data['data']['reels_media']:
return [] # no stories present
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a warning as to why there aren't any stories?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! What other extractors are doing in a similar situations? Actually by using the web browser what happens is that no stories could be seen and a «Log in to view this story» form is showed.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, now that you mention it: most other extractors also don't show any warnings etc. in such situations, even though they should. I guess it's OK to leave it like that for right now, and I'll go and add some more "authentication required" error messages to all other extractors.

gallery_dl/extractor/instagram.py Outdated Show resolved Hide resolved
gallery_dl/extractor/instagram.py Outdated Show resolved Hide resolved
iamleot added 2 commits August 5, 2019 21:06
Simplify handling of typename in InstagramExtractor.items() and multi-line
string in _extract_stories().  NFCI.
@mikf mikf merged commit 2df050e into mikf:master Aug 5, 2019
@Hrxn
Copy link
Contributor

Hrxn commented Aug 5, 2019

Hey, sorry for popping in here, but I thought it would be best to just ask real quick before opening a new [instagram] Add support for IGTV issue in a more formal manner.

What are your thoughts on IGTV support? Which is basically video, but not exactly the same video you would find on a normal Instagram feed (i.e. a standard video post). Don't ask me about the idea behind this, I have no clue, and it's not immediately obvious to me. But, well, it's there..

I think here's the official announcement:
https://instagram-press.com/blog/2018/06/20/welcome-to-igtv/

And from there, an example account on Instagram:
https://www.instagram.com/laurdiy/

Which has a IGTV section (right next to Posts):
https://www.instagram.com/laurdiy/channel/

It seems like there is only one entry though, and the link format for such an IGTV "post" looks like this:
https://www.instagram.com/tv/BkQL48uB_cV/

@iamleot
Copy link
Contributor Author

iamleot commented Aug 8, 2019 via email

@iamleot
Copy link
Contributor Author

iamleot commented Aug 8, 2019 via email

@Hrxn
Copy link
Contributor

Hrxn commented Aug 8, 2019

@iamleot Don't worry about any delays, just take all the time you need.. 😄
And thanks a lot four your PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants