English 中文(简体)
如何通过记录要求进行电话核查?
原标题:How to get through log in asking for phone verification?

我试图使我的许多工作自动化,这要求我到销售部队(销售管理方案)登记。 由于我不想学习所有APIC,我想通过Xpath和 st子将其外部化。 最大的问题是,每当我试图在销售量上登录时,它就承认一台计算机正在做标识,并要求向我的手机提供核查代码,因此,任何进一步的行动都绝对是站不住脚的。 谁能提供帮助?

from selenium import webdriver
chromedriver = "/Users/sebastiendupont/Downloads/chromedriver"
driver = webdriver.Chrome(chromedriver)
driver.get("https://bus.my.salesforce.com/?ec=302&startURL=%2Fvisualforce%2Fsession%3Furl%3Dhttps%253A%252F%252Fbus.lightning.force.com%252Flightni`enter code here`ng%252Fpage%252Fhome")
xpath =  //*[@id="username"] 
box = driver.find_element_by_xpath(xpath)
box.send_keys( mygmail )
xpath2 =  //*[@id="password"] 
box2 = driver.find_element_by_xpath(xpath2)
box2.send_keys( mypassword )
box.submit()
问题回答

为加强安全,还有意进行额外核查。 你无法绕过电话认证。 但是,如果你的申请允许你选择<<>谷歌>Athenticator<>/strong>,而选择两个因素认证,则你可以使用你的代码生成检察官办公室。

如下:

pip install pyotp
totp = TOTP("put secret key here")
token = totp.now()
print(token)




相关问题
Get webpage contents with Python?

I m using Python 3.1, if that helps. Anyways, I m trying to get the contents of this webpage. I Googled for a little bit and tried different things, but they didn t work. I m guessing that this ...

What is internal representation of string in Python 3.x

In Python 3.x, a string consists of items of Unicode ordinal. (See the quotation from the language reference below.) What is the internal representation of Unicode string? Is it UTF-16? The items ...

What does Python s builtin __build_class__ do?

In Python 3.1, there is a new builtin function I don t know in the builtins module: __build_class__(...) __build_class__(func, name, *bases, metaclass=None, **kwds) -> class Internal ...

what functional tools remain in Python 3k?

I have have read several entries regarding dropping several functional functions from future python, including map and reduce. What is the official policy regarding functional extensions? is lambda ...

Building executables for Python 3 and PyQt

I built a rather simple application in Python 3.1 using PyQt4. Being done, I want the application to be distributed to computers without either of those installed. I almost exclusively care about ...

热门标签