yh6788 发表于 2019-5-27 08:24:22

自动不断发认证短信给指定手机号码

这是以前刚学python时候写的,很简单,但是用了我大量时间找网址。

就是用selentum提交不同网的信息。其实这个利润按键精灵也一样能做,而且做的更好。
selenium需要去网站下载浏览器程序:F:\datatools\chromedriver.exe

其它就是体力劳动了,找网站,找关键字。

这个功能我只是初做,哪们高手有好的思路,麻烦留言告诉我。谢谢。
**** Hidden Message *****

老师注意我 发表于 2019-6-11 21:29:08

666

xiang0421 发表于 2019-6-12 18:55:11

1

丶不才 发表于 2019-6-12 21:38:31

看看

85360903 发表于 2019-6-15 13:12:59

342

443370940@qq.co 发表于 2019-6-16 11:02:49

66666666

443370940@qq.co 发表于 2019-6-16 13:00:29

显示没导入模块,怎么导入啊?不是很懂

yh6788 发表于 2019-6-16 13:34:05

443370940@qq.co 发表于 2019-6-16 13:00
显示没导入模块,怎么导入啊?不是很懂

pip3 install Selenium

443370940@qq.co 发表于 2019-6-16 13:52:01

yh6788 发表于 2019-6-16 13:34
pip3 install Selenium

导入完成之后,还是运行不了

443370940@qq.co 发表于 2019-6-16 13:53:44


Traceback (most recent call last):
File "D:\Python\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
    stdin=PIPE)
File "D:\Python\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
File "D:\Python\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
FileNotFoundError: 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Python\111.python.py", line 56, in <module>
    driver = webdriver.Chrome(mulu)
File "D:\Python\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
    self.service.start()
File "D:\Python\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

yh6788 发表于 2019-6-16 14:28:48

443370940@qq.co 发表于 2019-6-16 13:52
导入完成之后,还是运行不了

下载程序,保存为F:\datatools\chromedriver.exe


https://dl.pconline.com.cn/download/1047539.html

443370940@qq.co 发表于 2019-6-16 17:30:51

yh6788 发表于 2019-6-16 14:28
下载程序,保存为F:\datatools\chromedriver.exe




F盘没有这个路径啊

yh6788 发表于 2019-6-17 14:40:30

443370940@qq.co 发表于 2019-6-16 17:30
F盘没有这个路径啊

因为程序要用chromdriver.exe这个驱动,而程序又要指出这个文件在哪个位置。
我把程序放在这里的,你自己可以选择自己的程序所在位置,比如c:\,或者d:\temp,随意。这就是一个路径

443370940@qq.co 发表于 2019-6-17 21:04:57

yh6788 发表于 2019-6-17 14:40
因为程序要用chromdriver.exe这个驱动,而程序又要指出这个文件在哪个位置。
我把程序放在这里的,你自 ...

托到cmd里面安装吗

443370940@qq.co 发表于 2019-6-17 21:09:33

或者你有没有其他联系方式,我加一下你

非鱼~~ 发表于 2019-6-18 09:59:33

1

abababab 发表于 2019-6-18 16:48:47

还能用么,来看看下

yyyhhhtttyyyhhh 发表于 2019-6-18 20:09:02

DevTools listening on ws://127.0.0.1:12135/devtools/browser/05731970-1420-4a01-aaed-7395b60825dd
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\1.py", line 47, in <module>
    driver.maximize_window()
File "D:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 737, in maximize_window
    self.execute(command, params)
File "D:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
File "D:\python\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 get automation extension
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"61585801D327EB85F57DD615E0833843","isDefault":true,"type":"default"},"id":1,"name":"","origin":"://"}
(Session info: chrome=74.0.3729.169)
(Driver info: chromedriver=2.7.236900,platform=Windows NT 6.3 x86_64)

yh6788 发表于 2019-6-18 20:44:13

443370940@qq.co 发表于 2019-6-17 21:09
或者你有没有其他联系方式,我加一下你

不用安装,放在指定目录就行,python会进去调用。

yh6788 发表于 2019-6-18 20:45:34

yyyhhhtttyyyhhh 发表于 2019-6-18 20:09
DevTools listening on ws://127.0.0.1:12135/devtools/browser/05731970-1420-4a01-aaed-7395b60825dd
Tr ...

driver.maximize_window()
是这行的最大化窗口出问题,你直接把这行#或者删除掉不用它就行了。windows和苹果系统这行最大化的指令不一样。
去掉之后就是没有了自动最大化功能。不影响。
页: [1] 2 3 4
查看完整版本: 自动不断发认证短信给指定手机号码