I have the following setting in quickstart.py
session.set_do_follow(enabled=True, percentage=10, times=40)
session.like_by_tags(['marais'], amount=400)
I am expecting the program to run until it likes 400 images for the specified tag and follow upto 40 users.
It likes only 27 images.
Log from display:
DevTools listening on ws://127.0.0.1:12968/devtools/browser/34707ab7-6313-4a61-97a5-b899f38bccf3
INFO [2018-05-01 23:31:15] [myaccount_name] Session started - 2018-05-01 23:31:15
WARNING [2018-05-01 23:31:15] [myaccount_name] Sorry, Record Activity is not working on Windows. We're working to fix this soon!
[708:1764:0501/233123.162:ERROR:shader_disk_cache.cc(238)] Failed to create shader cache entry: -2
INFO [2018-05-01 23:31:56] [myaccount_name] Logged in successfully!
INFO [2018-05-01 23:31:58] [myaccount_name] Tag [1/1]
INFO [2018-05-01 23:31:58] [myaccount_name] --> b'marais'
INFO [2018-05-01 23:33:51] [myaccount_name] [1/27]
As you can see in the last line, it has already set the limit as 27.
INFO [2018-05-01 23:39:30] [myaccount_name] Liked: 16
INFO [2018-05-01 23:39:30] [myaccount_name] Already Liked: 9
INFO [2018-05-01 23:39:30] [myaccount_name] Inappropriate: 2
INFO [2018-05-01 23:39:30] [myaccount_name] Commented: 1
INFO [2018-05-01 23:39:30] [myaccount_name] Followed: 2
[3676:10356:0501/233932.317:ERROR:broker_win.cc(57)] Error reading broker pipe: The pipe has been ended. (0x6D)
INFO [2018-05-01 23:40:05] [myaccount_name] Session ended - 2018-05-01 23:40:05
INFO [2018-05-01 23:40:05] [myaccount_name] --------------------
I am sorry, I am new to InstaPy (and also Python). I am not sure what configuration I should copy as instapy.py is a big file. So I have attached the complete file.
hi @Madhu-sudhanan,
From your console output, I can tell that you're running an old version of files, please update to the latest files (_do git pull master
or re-download
(or re-clone
) InstaPy repository_) and try again, it is already fixed.
In particular, just update like_util.py file to see the effect, but updating full repository is a better choice
@uluQulu Thanks for the response!
I have cloned the latest version from the repository. I am getting the following error:
Traceback (most recent call last):
File "quickstart.py", line 25, in
session.login()
File "C:\D drive\Workspace\InstaPy\instapy\instapy.py", line 317, in login
self.followed_by = log_follower_num(self.browser, self.username, self.logfolder)
File "C:\D drive\Workspace\InstaPy\instapy\print_log_writer.py", line 11, in log_follower_num
"return window._sharedData.""entry_data.ProfilePage."
File "C:\D drive\Workspace\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 627, in execute_script
'args': converted_args})['value']
File "C:\D drive\Workspace\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "C:\D drive\Workspace\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Cannot read property 'user' of undefined
(Session info: chrome=66.0.3359.139)
(Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 10.0.16299 x86_64)
Should I start a new thread for this?
I have attached my quickstart.py below
Welcome @Madhu-sudhanan,
It is a very fresh issue you have encountered and the solution is found at #1936.
_I guess it also is merged, try to update again and see if it works?_
I have updated and run, a new error this time. Possible that I did something wrong this time
Traceback (most recent call last):
File "quickstart.py", line 33, in
session.like_by_tags(['marais'], amount=100)
File "C:\D drive\Workspace\InstaPy\instapy\instapy.py", line 957, in like_by_tags
self.logger)
File "C:\D drive\Workspace\InstaPy\instapy\like_util.py", line 461, in check_link
media = post_page['media']
TypeError: list indices must be integers or slices, not str
You have done nothing, @Madhu-sudhanan 馃槄,
Have a read this fresh solution at https://github.com/timgrossmann/InstaPy/issues/1946#issuecomment-386116515
Followed the instructions in #1946 (comment). Got past my previous error, but I am getting another error.
Traceback (most recent call last):
File "quickstart.py", line 33, in
session.like_by_tags(['marais', 'mylittleparis'], amount=100)
File "C:\D drive\Workspace\InstaPy\instapy\instapy.py", line 957, in like_by_tags
self.logger)
File "C:\D drive\Workspace\InstaPy\instapy\like_util.py", line 459, in check_link
'''.format(user_name))
File "C:\D drive\Workspace\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 627, in execute_script
'args': converted_args})['value']
File "C:\D drive\Workspace\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "C:\D drive\Workspace\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Cannot read property 'shortcode_media' of undefined
(Session info: chrome=66.0.3359.139)
(Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 10.0.16299 x86_64)
[3388:10272:0503/010109.660:ERROR:broker_win.cc(134)] Error sending sync broker message: The pipe is being closed. (0xE8)
@Madhu-sudhanan,
Well, it is weird, attach zipped like_util.py file, I will look further
Thank you! I have attached it here. I am also attaching print_log_writer.py
Welcome, @Madhu-sudhanan,
in like_util.py,
window._sharedData.entry_data.PostPage.graphql.shortcode_media.edge_media_to_comment.edges;
should be
window._sharedData.entry_data.PostPage[0].graphql.shortcode_media.edge_media_to_comment.edges;
_you have missed putting [0]
back in there_
This particular line appears to be commented. Should I still add there?
@Madhu-sudhanan,
Yes of course, since _triple single quotes_ in there are the way to send multi-line JS statements with {}
python formatter rather than typical arguments[i]
JS notation, and is not a typical python multi-line triple quotes _comment_.
Thank you so much! Its running fine now!!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
Most helpful comment
Thank you so much! Its running fine now!!