tuxity / insta-unfollower

An Instagram script to unfollow accounts who doesn't follow-you-back
MIT License
381 stars 89 forks source link

Not working with Docker / Powershell or Command Prompt or Python. #67

Closed dankillam closed 2 years ago

dankillam commented 2 years ago

Hi Kevin,

I attempted to run the script using Powershell and Docker.

I ran:

docker build -t tuxity/insta-unfollower .
docker run -d -v ${pwd}/cache:/usr/src/insta-unfollower/cache --env INSTA_USERNAME=myusername --env INSTA_PASSWORD=mypassword tuxity/insta-unfollower

It completed, but the only output appears to be a SHA256 hash: 5d737d9604498df8c3dbd6ef4a46fdfc9a3c9f4b643acc29f9541713baaa963a

The above is the only output I received.

I also attempted this in Command Prompt. I ran:

docker build -t tuxity/insta-unfollower .
docker run -d -v cache:/usr/src/insta-unfollower/cache --env INSTA_USERNAME=myusername --env INSTA_PASSWORD=mypassword tuxity/insta-unfollower

This also only provided me a hash: cb50361625533de797e0df33e71a4fbf29d44790b90ed2da1de5f15843acd8ff

Additionally, I attempted to just run it using Python3 and used the following: python3 insta-unfollower.py USERNAME PASSWORD

I received the following:

Traceback (most recent call last):
  File "C:\Users\zz\Downloads\insta-unfollower-master\insta-unfollower.py", line 295, in <module>
    main()
  File "C:\Users\zz\Downloads\insta-unfollower-master\insta-unfollower.py", line 228, in main
    connected_user = get_user_profile(credentials.username)
  File "C:\Users\zz\Downloads\insta-unfollower-master\insta-unfollower.py", line 90, in get_user_profile
    response = json.loads(extract.group(1))
AttributeError: 'NoneType' object has no attribute 'group'

With this many attempts, I feel like I must be doing something wrong. Is this something I'm doing wrong or does something else need to be fixed?

Cheers

ohnoitsjmo commented 2 years ago

Yeah seems like the extract variable is getting set to None on this line. extract = re.search(r'window._sharedData = (.+);</script>', str(response.text)) Perhaps Instagram changed a variable name on their frontend. Not sure what this regex is trying to access.

Alb93 commented 2 years ago

Check this out https://github.com/tuxity/insta-unfollower/pull/69

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days