A. 怎樣用 Python 寫一個股票自動交易的程序
網址都沒有給出怎麼測試呢? 這個應該是伺服器生成的token吧,可以urllib2抓一下,如果抓不到的話那麼他可能用的js動態載入,這個得分析js源碼了,如果他用了flash來算出這個值的(我記得酷狗就是這么做的),那麼恭喜你,不能算出這個值了
B. python 的 pyautogui,怎麼同時按下多個按鍵
python是當下十分火爆的編程語言,尤其在人工智慧應用方面。如果有心從事編程方向的工作,最好到專業機構深入學習、多實踐,更貼近市場,這樣更有利於將來的發展。
C. 如何解決python3中pyautogui模塊無法使用moveTo函數的問題
是mac機器上的嗎?新的安全功能要求用戶需要明確指定可以用滑鼠和鍵盤的應用。
需要讓termial可以控制滑鼠和鍵盤才行。
D. python安裝pyautogui出錯,找了很多辦法都不行
已解決,如果最新版的不行就換一個舊版的pyautogui,比如我用的pyautogui-0.9.35
pipinstallpyautogui==0.9.35
E. pyautogui和什麼庫搭配
和Python庫搭配。
Python由荷蘭數學和計算機科學研究學會的吉多·范羅蘇姆於1990年代初設計,作為一門叫做ABC語言的替代品。
Python提供了高效的高級數據結構,還能簡單有效地面向對象編程。
Python解釋器易於擴展,可以使用C語言或C++(或者其他可以通過C調用的語言)擴展新的功能和數據類型。
F. Python是如何利用pyautogui實現基本零延時點擊滑鼠左鍵
pyautogui.click(x=moveToX, y=moveToY, clicks=num_of_clicks, interval=secs_between_clicks, button='left')
interval參數就是兩次點擊間隔時間
G. Python PyAutoGUI錯誤提示求解
先寫一下自己的環境:操作系統windows7 64位,python版本python-3.7.0-amd64,安裝方式pip。OK,下面就開始逐條列舉所遇問題及解決方法。
1.運行pip install pyautogui後出現如下錯誤(黃字):
Collecting pyautogui
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pyautogui/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pyautogui/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pyautogui/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pyautogui/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pyautogui/
Could not fetch URL https://pypi.org/simple/pyautogui/: There was a problem co
nfirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Ma
x retries exceeded with url: /simple/pyautogui/ (Caused by SSLError(SSLCertVerif
icationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: una
ble to get local issuer certificate (_ssl.c:1045)'))) - skipping
Could not find a version that satisfies the requirement pyautogui (from versio
ns: )
No matching distribution found for pyautogui
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming
the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retrie
s exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1
, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get loc
al issuer certificate (_ssl.c:1045)'))) - skipping
這個問題比較坑,看log應該是https鑒權,於是上網找了各種方法,都不行,重裝python,重啟電腦,修改電腦時間都不行,最後發現是自己在調式其他東西打開了fiddler,關閉fiddler就好了,這個是被自己坑了。
2.繼續運行pip install pyautogui後提示You are using pip version 10.0.1, however version 19.0.1 is available.
這個是pip版本低了,根據提示運行python -m pip install --upgrade pip即可。
3.繼續運行pip install pyautogui出現錯誤:
Using cached https://files.pythonhosted.org/packages/01/ed/56d4a369c6e18f6b239
/PyGetWindow-0.0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <mole>
File "C:\Users\80237102\AppData\Local\Temp\pip-install-m1k3v484\pygetwindo
w\setup.py", line 11, in <mole>
long_description = fh.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 905: ille
gal multibyte sequence
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\80237102
\AppData\Local\Temp\pip-install-m1k3v484\pygetwindow\
這個錯誤是安裝pyautogui過程中遇到的一個核心錯誤,是安裝PyGetWindow過程中出現的,網上搜了一通,最後試了各種方法,就是降低PyGetWindow版本,默認安裝的PyAutoGUI-0.9.41,依賴的是PyGetWindow-0.0.4,就是這個PyGetWindow-0.0.4導致了上述問題,於是網上大神說降低PyGetWindow版本,運行pip install PyGetWindow==0.0.1後安裝PyGetWindow成功,然後再運行pip install pyautogui,這次成功了
H. python pyautogui 怎麼安裝
PyAutoGUI官方庫下載地址:https://pypi.python.org/pypi/PyAutoGUI/0.9.33
去這里下載安裝就好了。
I. pyautogui 與 autohotkey 哪個強大一些
語言設計上明顯 autoit 更好,不過 ahk 更普及,腳本更好找,目前加入了 OO ,能力不相上下了。
ahk 開源,還有一些黑科技,比如使用單個 modifier 鍵控制。
總體還是看個人喜好, pyautogui 我沒用過,不了解。
J. 安裝Python的pyautogui庫報錯怎麼辦
我將從 centos 開始,一個 linux 發行版,來解釋在 linux 平台上安裝 pyautogui 模塊。如下圖所示,pyautogui 是一個 python 模塊,因此需要確保正確執行 python 命令,並正確安裝 pip 模塊,如下所示: 正確顯示 python 和 pip 版本信息。?2/6在確認 python 和 pip 都正常工作之後,執行如下圖所示的安裝命令: pip 將自動解析一些 pyautogui 依賴並下載相應的依賴包。直到最後的安裝完成?36pyautogui 軟體包安裝完成後,目前還不能使用。要正確使用它,你需要避免兩個坑洞。首先,它需要一個 xlib 依賴項,但是 pip 不會自動安裝它,它需要手動安裝,如下圖所示: 使用 pip 安裝 xlib 包,直到安裝完成。?4/6如果 xlib 包沒有安裝,盡管 pyautogui 安裝正確,但當您使用它時,它會給您一個錯誤,如下所示,提示 xlib 包的缺席?你需要避免的第二個漏洞是 pyautogui 是一個 gui gui 工具,不能在連接 ssh 的終端上工作,例如當通過 securcrt 和 xshell 連接到 linux 系統時。如下圖所示,當我通過 xshell 連接到 linux 系統,然後導入 pyautogui 包時,我直接報告了一個錯誤。所以你必須通過 linux 圖形桌面登錄,打開虛擬終端,並導入 pyautogui 模塊沒有錯誤,如下圖所示: 導入模塊是正常的,模塊中的函數是正常的。?
