AgiMaulana / Instagram-Comments-Scraper

Instagram comment scraper using python and selenium. Save the comments into excel.
MIT License
137 stars 44 forks source link

Would it be possible to enter the username and have it collect comments from all posts? #10

Open eduaardogs1 opened 3 years ago

eduaardogs1 commented 3 years ago

Would it be possible to enter the username and have it collect comments from all posts? How? Thankss

AgiMaulana commented 3 years ago

Hi, @eduaardogs1 , that scenario is not possible for now, you should fetch the comments by each post's URL

eduaardogs1 commented 3 years ago

Hi, @eduaardogs1 , that scenario is not possible for now, you should fetch the comments by each post's URL

Thanks for the answer @AgiMaulana ! How can I enter a post list? Or would it be possible to load a txt with a list of publications? Thanks!

cxheng315 commented 2 years ago

Hi, @eduaardogs1 , that scenario is not possible for now, you should fetch the comments by each post's URL

Thanks for the answer @AgiMaulana ! How can I enter a post list? Or would it be possible to load a text with a list of publications? Thanks!

In case others need to solve this problem, in line 6 driver.get(sys.argv[1]) this is implemented by calling chrome driver to get the specific link sys.argv[1] so if you need to do a list of it, you may add a for loop to get the link

link_list = ['123.com','456.com'] 
for i in range(len(link_list)) : 
driver.get(link_list[i])
... other function