Townie Robbins
Townie Robbins

Reputation: 43

Cannot find source code files - InstaPy - cannot detect post media type

novice coder here again with another probably simple problem that I'm not able to find a solution to.

I'm getting an error using InstaPy similar to the error that everyone has found here (https://github.com/timgrossmann/InstaPy/pull/6143) and I'm attempting to make the edit to the like_util.py file as suggested in this Pull Request. However I'm unable to find the like_util file in my mac.

When I open the InstaPy folder, it has some .db files and a .xpi file. (see attached screenshot) I installed sqlitebrowser, but the like_util.py file is not in the instapy.db file. I'm not sure where I should be able to locate these source files for InstaPy. Screenshot of the sqlite browser is attached as well.

I realize this is a simple issue, and any help is greatly appreciated.

Here is the code I'm trying to run:

#real bot

from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from instapy import InstaPy

browser = webdriver.Firefox(executable_path = '/Applications/Python 3.9/geckodriver')

browser.quit()


sesh = InstaPy(username="dave", password="pass",geckodriver_path= r'/Applications/Python 3.9/geckodriver')
sesh.login()

sesh.like_by_tags(["ween","townie"])

browser.implicitly_wait(10)

sleep(5)

print('whoah there!!!')

sleep(1)

browser.quit()

and the issue when trying to like posts based on the hashtags:

INFO [2021-10-07 19:40:42] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUut0UWl-45/
INFO [2021-10-07 19:41:07] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUusbU2Ik-a/
INFO [2021-10-07 19:41:33] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUuo5VAF1ey/
INFO [2021-10-07 19:42:10] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUvM12ppavg/
INFO [2021-10-07 19:42:10] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUvM12ppavg/
INFO [2021-10-07 19:42:10] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUvM12ppavg/
INFO [2021-10-07 19:42:10] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUvM12ppavg/
INFO [2021-10-07 19:42:10] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUvM12ppavg/
INFO [2021-10-07 19:42:35] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUvGIXYJ4Dv/
INFO [2021-10-07 19:43:00] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUvGAFCr9dx/
INFO [2021-10-07 19:43:25] [townierecords]  Cannot detect post media type. Skip https://www.instagram.com/p/CUvFzJTpgHK/

enter image description here

enter image description here

Upvotes: 1

Views: 368

Answers (1)

Townie Robbins
Townie Robbins

Reputation: 43

I found my answer when using pip to delete instapy. When it showed the warning, it showed the ultimate location of the instapy files buried deep in the library. There I was able to find the like_util.py file. Not sure if it will work for me but this was the main reason for asking this question.

Upvotes: 1

Related Questions