JustAnotherArchivist / JustAnotherArchivist/snscrape
IndexError of Instagram
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I want to use snscrape for collect instagram data. My code is:
```
import snscrape.modules.instagram as sninstagram
import pandas as pd
query='google' #change name
ins_s=[]
limit=10
for ins in sninstagram.InstagramHashtagScraper(query).get_items():
print(vars(ins))
break
```
And I got this error:
> jsonData = r.text.split('window._sharedData = ')[1].split(';')[0] # May throw an IndexError if Instagram changes something again; we just let that bubble.
IndexError: list index out of range
How can I fix it?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at InstagramHashtagScraper and inspect the response around the jsonData split shown in the report. Compare it with the current Instagram response, then verify that the provided hashtag query yields items without raising IndexError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100