asutorufa / hujiang_dictionary Goto Github PK
View Code? Open in Web Editor NEW日本語辞書
License: MIT License
日本語辞書
License: MIT License
I want to use this perfect dictionary tool in command line pipe, for example
fzf --preview to show the dictionary search result and using mpv to play the mp3 link at same time. there are many other cases for the need of the meta data of the search result.
As json is standard and popular format, this fuction will expose the power of this dictionary to all the command line world too. it's cool!
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/bin/hjjp", line 11, in <module>
load_entry_point('hjjpcj==0.9.8.6', 'console_scripts', 'hjjp')()
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/hjjp/hjjp.py", line 111, in main
start(option()[0],option()[1],option()[2])
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/hjjp/hjjp.py", line 30, in start
tree = lxml.html.fromstring((requests.get(url,headers={'User-Agent':useragent,'Cookie':Cookie})).text)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/adapters.py", line 495, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
----------查询单词 kodomo---------
网络连接错误,请检查网络是否连接!
Traceback (most recent call last):
File "/home/asutorufa/.local/bin/hjjp", line 11, in
sys.exit(main())
File "/home/asutorufa/.local/lib/python3.6/site-packages/hjjp/hjjp.py", line 119, in main
start(option()[0],option()[1],option()[2])
File "/home/asutorufa/.local/lib/python3.6/site-packages/hjjp/hjjp.py", line 42, in start
word_prnounces = word_simple(tree)
UnboundLocalError: local variable 'tree' referenced before assignment
UnboundLocalError: local variable 'xxx' referenced before assignment
在函数外部已经定义了变量n,在函数内部对该变量进行运算,运行时会遇到了这样的错误:
主要是因为没有让解释器清楚变量是全局变量还是局部变量
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.