VaishnaviVV / Instagram-Crawler

Social network analysis on Instagram hashtags and to find the relationship between the hashtags.
0 stars 0 forks source link

Error in working with jsonReader.R #1

Open drmdadkhah opened 2 years ago

drmdadkhah commented 2 years ago

Hi, Thank you for sharing this interesting script. I tried to use jsonReader.R, but i faced with an error. I changed "http://www.instagram.com/explore/tags/{hashtag}/?__a=1" to "https://www.instagram.com/explore/tags/{hashtag}/?__a=1" (https instead of http). The script worked for me at once. In future running i receive below error again:

> hashtag <- "bike"
> url_start <- str_glue("https://www.instagram.com/explore/tags/{hashtag}/?__a=1")
> json <- fromJSON(url_start)
Error in parse_con(txt, bigint_as_char) : 
  lexical error: invalid char in json text.
                                       <!DOCTYPE html> <html lang="en"
                     (right here) ------^

Could you please help me to overcome this issue? Thank once again, Mehdi

drmdadkhah commented 2 years ago

Is there any update? Thanks