我正在尝试使用 python 脚本访问www.cclonline.com网站并获取数据。\n这是代码。
\nimport requests\nfrom requests_html import HTML\n\nsource = requests.get(\'https://www.cclonline.com/category/409/PC-Components/Graphics-Cards/\')\nhtml = HTML(html=source.text)\nprint(source.status_code)\nprint(html.text)\nRun Code Online (Sandbox Code Playgroud)\n这是我得到的错误,
\n403\nAccess denied | www.cclonline.com used Cloudflare to restrict access\nPlease enable cookies.\nError 1020\nRay ID: 64c0c2f1ccb5d781 \xe2\x80\xa2 2021-05-08 06:51:46 UTC\nAccess denied\nWhat happened?\nThis website is using a security service to protect itself from online attacks.\nRun Code Online (Sandbox Code Playgroud)\n我怎么解决这个问题?谢谢。
\n我正在尝试使用套接字在 MetaTrader 5 和 Python 之间建立连接。服务器部分用 python 编写,客户端部分用 mql5 编写。客户也是 Expert Advisor,而不是指标。问题是当我同时运行服务器和客户端时,客户端给我“错误4014”。如果有人能帮助我解决这个问题,我非常感激。
//this is python server code
import socket
serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serv.bind(('127.0.0.1', 9090))
serv.listen(1)
while True:
conn, addr = serv.accept()
print('client connected to :', addr)
conn.close()
//This is mql5 client code
//+------------------------------------------------------------------+
//| test_client_EA.mq5 |
//| Copyright 2020, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
int socket;
int OnInit()
{
socket=SocketCreate();
return(INIT_SUCCEEDED);
}
void …Run Code Online (Sandbox Code Playgroud)