Danny-Dasilva / cycletls_python

32 stars 4 forks source link

Hi, I use this and have some problems,it can't work #9

Open xiaodeyue2 opened 2 years ago

xiaodeyue2 commented 2 years ago

D:\python\python.exe D:/python/rs/cycletls_python-main/client.py Traceback (most recent call last): File "D:/python/rs/cycletls_python-main/client.py", line 1, in from cycletls import CycleTLS File "D:\python\rs\cycletls_python-main\cycletls__init__.py", line 1, in from .api import CycleTLS File "D:\python\rs\cycletls_python-main\cycletls\api.py", line 3, in from .schema import Response, Request File "D:\python\rs\cycletls_python-main\cycletls\schema.py", line 9, in class Request(BaseModel): File "D:\python\rs\cycletls_python-main\cycletls\schema.py", line 19, in Request cookies: Optional[list[Cookie]] = None TypeError: 'type' object is not subscriptable

This is the first problem, I tried to rewrite line 19 of schema.py file, delete [Cookie] After re-run, '.' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� Traceback (most recent call last): File "D:\python\rs\cycletls_python-main\cycletls\api.py", line 25, in init self.ws = create_connection("ws://localhost:8080") File "D:\python\lib\site-packages\websocket_core.py", line 601, in create_connection websock.connect(url, **options) File "D:\python\lib\site-packages\websocket_core.py", line 245, in connect options.pop('socket', None)) File "D:\python\lib\site-packages\websocket_http.py", line 130, in connect sock = _open_socket(addrinfo_list, options.sockopt, options.timeout) File "D:\python\lib\site-packages\websocket_http.py", line 206, in _open_socket raise err File "D:\python\lib\site-packages\websocket_http.py", line 185, in _open_socket sock.connect(address) ConnectionRefusedError: [WinError 10061] Unable to connect because the target computer actively refused.

I don't quite understand the contents of the bottom 24th to 33rd line in the api.py file, subprocess.Popen, I guess the error may be because the executed file does not seem to exist.Looking forward to your replies and updates.

morrphology commented 1 year ago

port 8080 is probably in use so could change

create_connection("ws://localhost:8080")

to smth like

create_connection("ws://localhost:8050")