InstaPy / InstaPy/instapy-quickstart

Failed to get followers, following and unfollowers counts

Aperta
#154 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
777
Fork
763
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

On Windows 10 running through PyCharm.

I'm trying to get my followers and unfollowers from my original account (pre InstaPy) but InstaPy is unable to find them.

I run the following code:

```
from instapy import InstaPy
from instapy import smart_run

def job():
# get an InstaPy session!
# set headless_browser=True to run InstaPy in the background
session = InstaPy(username=insta_username,
password=insta_password,
want_check_browser=False,
headless_browser=True,
disable_image_load=True)
with smart_run(session):
session.set_quota_supervisor(enabled=True,
sleep_after=["likes", "comments_d", "follows",
"unfollows", "server_calls_h"],
sleepyhead=True, stochastic_flow=True,
notify_me=True,
peak_likes_hourly=55,
peak_likes_daily=566,
peak_comments_hourly=33,
peak_comments_daily=182,
peak_follows_hourly=55,
peak_follows_daily=None,
peak_unfollows_hourly=22,
peak_unfollows_daily=333,
peak_server_calls_hourly=None,
peak_server_calls_daily=4700)

nonfollowers = session.pick_nonfollowers(
username="kevinjohnsrude",
store_locally=True,
live_match=True)
print(nonfollowers)

job()
```

Here's my output:

```
InstaPy Version: 0.6.8
._. ._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "C:/Users/Kevin/InstaPy"
INFO [2020-05-07 20:20:34] [kevinjohnsrude] Session started!
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
....................................................................
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
INFO [2020-05-07 20:20:44] [kevinjohnsrude] Logged in successfully!
INFO [2020-05-07 20:20:44] [kevinjohnsrude] Saving account progress...
INFO [2020-05-07 20:21:37] [kevinjohnsrude] Failed to get followers count of 'b'kevinjohnsrude'' ~empty list
INFO [2020-05-07 20:22:27] [kevinjohnsrude] Failed to get following count of 'b'kevinjohnsrude'' ~empty list
WARNING [2020-05-07 20:22:27] [kevinjohnsrude] Unable to save account progress, skipping data update Message: TypeError: window._sharedData is undefined

INFO [2020-05-07 20:22:39] [kevinjohnsrude] Starting to pick Nonfollowers of kevinjohnsrude..
INFO [2020-05-07 20:22:39] [kevinjohnsrude] Retrieving live `Followers` data of kevinjohnsrude at "full" range
______________________________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2020-05-07 20:23:29] [kevinjohnsrude] Failed to get followers count of 'b'kevinjohnsrude'' ~empty list
INFO [2020-05-07 20:24:19] [kevinjohnsrude] Failed to get following count of 'b'kevinjohnsrude'' ~empty list
INFO [2020-05-07 20:24:19] [kevinjohnsrude] Sessional Live Report:
|> No any statistics to show

[Session lasted 3.85 minutes]
INFO [2020-05-07 20:24:19] [kevinjohnsrude] Session ended!
Traceback (most recent call last):
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\instapy\relationship_tools.py", line 86, in get_followers

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

"return window.__additionalData[Object.keys(window.__additionalData)[0]].data."
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 636, in execute_script
'args': converted_args})['value']
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: TypeError: window.__additionalData[Object.keys(...)[0]] is undefined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/Kevin/Documents/PycharmProjects/ig/ig.py", line 88, in
job()
File "C:/Users/Kevin/Documents/PycharmProjects/ig/ig.py", line 85, in job
live_match=True)
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\instapy\instapy.py", line 4417, in pick_nonfollowers
self.logfolder,
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\instapy\relationship_tools.py", line 703, in get_nonfollowers
logfolder,
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\instapy\relationship_tools.py", line 91, in get_followers
"return window._sharedData." "entry_data.ProfilePage[0]." "graphql.user.id"
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 636, in execute_script
'args': converted_args})['value']
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Kevin\.conda\envs\ig\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: TypeError: window._sharedData is undefined

Process finished with exit code 1
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.