Instapy: Is anyone's updated Firefox setup actually working?

Created on 17 Aug 2019  Â·  28Comments  Â·  Source: timgrossmann/InstaPy


Expected Behavior

Work

Current Behavior

Not Working

Possible Solution (optional)

InstaPy configuration

InstaPy 0.6.1, Chromedriver and current FireFox version. I have seen a lot of posts referencing the 'Login A/B test detected! Trying another string...' error and I am curious to see if anyone's Firefox Instapy build is actually working.

Most helpful comment

From Issue : Login A/B test detected! Trying another string...

To anybody still having this issue on 6.1
Its caused by a typo in the file _xpath_compile.py_

Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",

It looks like this ^^^

It needs to look like this

Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",

It will still throw the statement _Login A/B test detected! Trying another string..._ but then it _should_ login...

It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

All 28 comments

Is instapy down?

Sent from my iPhone

On Aug 16, 2019, at 9:46 PM, Flaunkerton2395 notifications@github.com wrote:

Expected Behavior

Work

Current Behavior

Not Working

Possible Solution (optional)

InstaPy configuration

InstaPy 0.6.1, Chromedriver and current FireFox version. I have seen a lot of posts referencing the 'Login A/B test detected! Trying another string...' error and I am curious to see if anyone's Firefox Instapy build is actually working.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Is instapy down?
…
Sent from my iPhone
On Aug 16, 2019, at 9:46 PM, Flaunkerton2395 @.*> wrote: Expected Behavior Work Current Behavior Not Working Possible Solution (optional) InstaPy configuration InstaPy 0.6.1, Chromedriver and current FireFox version. I have seen a lot of posts referencing the 'Login A/B test detected! Trying another string...' error and I am curious to see if anyone's Firefox Instapy build is actually working. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

It looks like, I have being trying to make it work again with no luck.... 2 weeks and counting.

It looks like, I have being trying to make it work again with no luck.... 2 weeks and counting.

same (on raspberry)

Works here, but some functions are broken/not working correctly, like skip popular posts. So it has hardly any effect and following is also broken. But technically, it works.

I've got it working almost perfectly (for my use anyways) after some changes to the code!

@Mr-HaleYa What changes did you make??

From Issue : Login A/B test detected! Trying another string...

To anybody still having this issue on 6.1
Its caused by a typo in the file _xpath_compile.py_

Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",

It looks like this ^^^

It needs to look like this

Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",

It will still throw the statement _Login A/B test detected! Trying another string..._ but then it _should_ login...

It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

Where can I find the file XPATH_COMPILE.PY?

Thanks!!

~/InstaPy/instapy# then ls and you should see it

Thanks!!

Do you know where this file is on Mac?

Should be in the same sub directory. go to InstaPy then find the the "instapy" folder and it should be a file in there

Strangely I don't have that file anywhere in my Instapy folder or my machine at all...

delete the files and then re-clone it lol

I just tried running 'pip3 install instapy -U' in Terminal but it still didn't show up lol is there another way?

not too sure here, is it using firefox?
there should be that file in the sub directory because it tells python what buttons to click. Maybe it got put into another folder?

I'm on 0.6.1 and it's definitely trying to run Firefox. What's interesting is my login.util file does have this mention of 'login_elem_no_such_exception':

try:
    login_elem = browser.find_element_by_xpath(
        read_xpath(login_user.__name__, "login_elem"))
except NoSuchElementException:
    print("Login A/B test detected! Trying another string...")
    try:
        login_elem = browser.find_element_by_xpath(
            read_xpath(login_user.__name__, "login_elem_no_such_exception")
        )
    except NoSuchElementException:
        return False

what happens if you try grabbing just that file and editing it? the xpath?

I can edit the file but that specific line 'login_elem_no_such_exception": "//a[text()='Log``` In']' is not anywhere in there sadly

@clone2324 He's in the wrong file and if you add that it won't work. He needs to be in the _xpath_compile.py_ file but is instead in the _login.util_ file. This is the only reference of the error because this is where it is thrown from. Its thrown from here because of a typo in the _xpath_compile.py_ file causing the _login.util_ file not to work properly and throw an error.

I don't even have that file in my installation which is strange

@Flaunkerton2395 Can you message me on discord?

It should be under something like
(yourusername)\Lib\Python3.7\site-packages\Instapy

Cool @Mr-HaleYa ! I edited the code as you indicated. It effectively shows the detected A / B message, but continues without problems. Thank you

PD: In case someone helps, the xpath on my pc is in: C:Users\Usuario\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\instapy

4902

From Issue : Login A/B test detected! Trying another string...
To anybody still having this issue on 6.1
Its caused by a typo in the file _xpath_compile.py_
Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",
It looks like this ^^^
It needs to look like this
Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",
It will still throw the statement _Login A/B test detected! Trying another string..._ but then it _should_ login...
It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

From Issue : Login A/B test detected! Trying another string...
To anybody still having this issue on 6.1
Its caused by a typo in the file _xpath_compile.py_
Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",
It looks like this ^^^
It needs to look like this
Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",
It will still throw the statement _Login A/B test detected! Trying another string..._ but then it _should_ login...
It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

i tried this one it logged in but afer one like i am getting this.

Traceback (most recent call last):
File "C:Users\Jalebee\Desktop\nepi\instapy-quickstart-master\quickstart_templates\good_commenting_strategy_and_new_qs_system.py", line 89, in
session.like_by_tags(my_hashtags, amount=60, media=None)
File "C:Users\Jalebee\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\instapy.py", line 1914, in like_by_tags
self.logger,
File "C:Users\Jalebee\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\like_util.py", line 606, in check_link
media = post_page[0]["media"]
KeyError: 'media'

this is my full code please help @Mr-HaleYa
"""
This template is written by @the-unknown

What does this quickstart script aim to do?

  • This is my template which includes the new QS system.
    It includes a randomizer for my hashtags... with every run, it selects 10
    random hashtags from the list.

NOTES:

  • I am using the bot headless on my vServer and proxy into a Raspberry PI I
    have at home, to always use my home IP to connect to Instagram.
    In my comments, I always ask for feedback, use more than 4 words and
    always have emojis.
    My comments work very well, as I get a lot of feedback to my posts and
    profile visits since I use this tactic.

As I target mainly active accounts, I use two unfollow methods.
The first will unfollow everyone who did not follow back within 12h.
The second one will unfollow the followers within 24h.
"""

!/usr/bin/python2.7

import random
from instapy import InstaPy
from instapy import smart_run

get a session!

session = InstaPy(username='', password='', headless_browser=True)

let's go! :>

with smart_run(session):
hashtags = ['raspberrypi', 'arduino', 'hacking', 'robotics',
'robot', 'diy', 'opencv',
'ai', 'maker', 'electronics', 'instructables',
'mechatronics']
random.shuffle(hashtags)
my_hashtags = hashtags[:10]

# general settings
session.set_dont_like(['sad', 'rain', 'depression'])
session.set_do_follow(enabled=True, percentage=40, times=1)
session.set_do_comment(enabled=True, percentage=30)
session.set_comments([
                         u'amazing project :heart_eyes: What do '
                         u'looking for something like this',
                         u'What an amazing! :heart_eyes: I think '
                         u'you might also like mine. :wink:',
                         u'Wonderful!! :heart_eyes: Would be awesome if '
                         u'you would checkout my projects as well!',
                         u'Wonderful!! :heart_eyes: I would be honored '
                         u'if you would checkout my projects and tell me '
                         u'what you think. :wink:',
                         u'This is awesome!! :heart_eyes: Any feedback '
                         u'for my projects? :wink:',
                         u'This is awesome!! :heart_eyes:  maybe you '
                         u'like my projects, too? :wink:',
                         u'I really like this concept. I '
                         u'bet you like my projects, too :wink:',
                         u'I really like the way you did this. If '
                         u'you have time, check out my projects, too. I '
                         u'bet you will like them. :wink:',
                         u'Great capture!! :smiley: Any feedback for my '
                         u'recent project? :wink:',
                         u'Great idea!! :smiley: :thumbsup: What do '
                         u'you think of my recent project?'],
                     media='Photo')
session.set_do_like(True, percentage=70)
session.set_delimit_liking(enabled=True, max_likes=100, min_likes=0)
session.set_delimit_commenting(enabled=True, max_comments=30, min_comments=0)
session.set_relationship_bounds(enabled=True,
                                potency_ratio=None,
                                delimit_by_numbers=True,
                                max_followers=3000,
                                max_following=2000,
                                min_followers=100,
                                min_following=50)

session.set_quota_supervisor(enabled=True,
                             sleep_after=["likes", "follows"],
                             sleepyhead=True, stochastic_flow=True,
                             notify_me=True,
                             peak_likes_hourly=(50, 1000),
                             peak_comments_hourly=(20, 250),
                             peak_follows_hourly=(20, None))

session.set_user_interact(amount=1, randomize=False, percentage=40)

# activity
session.like_by_tags(my_hashtags, amount=60)
session.unfollow_users(amount=500, nonFollowers=True, style="RANDOM", unfollow_after=24*60*60,
                        sleep_delay=501)

""" Joining Engagement Pods...
"""
session.join_pods(topic='sports')

4908

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neomh picture neomh  Â·  3Comments

CodeMaster1 picture CodeMaster1  Â·  3Comments

tibor picture tibor  Â·  3Comments

drcyber975 picture drcyber975  Â·  3Comments

ghost picture ghost  Â·  3Comments