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

snscrape instagram module is not working #1007

Closed
sagar2120 opened this issue Jul 6, 2023 · 1 comment
Closed

snscrape instagram module is not working #1007

sagar2120 opened this issue Jul 6, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@sagar2120
Copy link

sagar2120 commented Jul 6, 2023

Describe the bug

    jsonData = r.text.split('<script type="text/javascript">window._sharedData = ')[1].split(';</script>')[0] # May throw an IndexError if Instagram changes something again; we just let that bubble.
IndexError: list index out of range

this error is occuired while scrape hashtag using InstagramHashtagScraper in below code

import snscrape.modules.instagram as snsInt

scraper = snsInt.InstagramHashtagScraper('graphic')
posts = scraper.get_items()

for post in posts:
    print(post.likes)

can you or any other can guide me

How to reproduce

    jsonData = r.text.split('<script type="text/javascript">window._sharedData = ')[1].split(';</script>')[0] # May throw an IndexError if Instagram changes something again; we just let that bubble.
IndexError: list index out of range

this error is occuired while scrape hashtag using InstagramHashtagScraper in below code

import snscrape.modules.instagram as snsInt

scraper = snsInt.InstagramHashtagScraper('graphic')
posts = scraper.get_items()

for post in posts:
    print(post.likes)

can you or any other can guide me

Expected behaviour

    jsonData = r.text.split('<script type="text/javascript">window._sharedData = ')[1].split(';</script>')[0] # May throw an IndexError if Instagram changes something again; we just let that bubble.
IndexError: list index out of range

this error is occuired while scrape hashtag using InstagramHashtagScraper in below code

import snscrape.modules.instagram as snsInt

scraper = snsInt.InstagramHashtagScraper('graphic')
posts = scraper.get_items()

for post in posts:
    print(post.likes)

can you or any other can guide me

Screenshots and recordings

No response

Operating system

windows 10

Python version: output of python3 --version

3.10.5

snscrape version: output of snscrape --version

snscrape 0.7.0.20230622

Scraper

instagram(InstagramHashtagScraper)

How are you using snscrape?

Module (import snscrape.modules.something in Python code)

Backtrace

No response

Log output

No response

Dump of locals

No response

Additional context

No response

@sagar2120 sagar2120 added the bug Something isn't working label Jul 6, 2023
@JustAnotherArchivist JustAnotherArchivist added duplicate This issue or pull request already exists and removed bug Something isn't working labels Jul 6, 2023
@JustAnotherArchivist
Copy link
Owner

#520

@JustAnotherArchivist JustAnotherArchivist closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants