scraping all comments under an instagram post with python

i get the code from youtube: https://www.youtube.com/watch?v=0fNyKKeiv_0
there's the code starting:

from selenium import webdriver
import time
import datetime
import insta_cred as cred

def get_comments():
    
    rettxt = []
    try:
        scroll = True
        count = 0
        while scroll and count < 15 : #scrolling

when i'm running this code "import insta_cred as cred", i get error from my console:

ModuleNotFoundError: No module named 'insta_cred'

how i fix it?

Upvotes: 0

Views: 1352

Answers (1)

Emil
Emil

Reputation: 87

You must install the package to be able to use it. Luckily, Python provides this with the pip3 utility. If you know the package to be installed (some form of instagram bot), you can run pip3 install <name of package> to install it on your machine.

Upvotes: 1

Related Questions