Comments (5)
What about something like in this diff: master...aaschmid:master
This might be solving #15, it also solves #12 and suggest an improvment for copy&pasting words from CLI.
Any feedback welcome and I am happy to improve it. I will also create single PRs for every topic if some is already OK for you...
from dict.cc.py.
@rbaron: Any thoughts on my first steps in order to improve it and create a PR?
from dict.cc.py.
Hi @aaschmid,
it seems like your branch is not working correctly on my computer with Python3:
% dict.cc.py en de body
Traceback (most recent call last):
File "/private/tmp/dict.cc.py/venv/bin/dict.cc.py", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "/private/tmp/dict.cc.py/scripts/dict.cc.py", line 81, in <module>
run()
File "/private/tmp/dict.cc.py/scripts/dict.cc.py", line 62, in run
args.output_language)
File "/private/tmp/dict.cc.py/dictcc/dictcc.py", line 60, in translate
result = cls._parse_response(response_body)
File "/private/tmp/dict.cc.py/dictcc/dictcc.py", line 101, in _parse_response
languages = [language.strings.next() for language in soup.find_all("td", class_="td2", attrs={'dir': "ltr"})]
File "/private/tmp/dict.cc.py/dictcc/dictcc.py", line 101, in <listcomp>
languages = [language.strings.next() for language in soup.find_all("td", class_="td2", attrs={'dir': "ltr"})]
AttributeError: 'generator' object has no attribute 'next'
from dict.cc.py.
better @rbaron?
- I used python 2; now it is running with both 2 and 3)
- Removed the other fix also from my master but did not rebase it yet
from dict.cc.py.
Hi @aaschmid, I just tested it and works great. Feel free to send a PR!
from dict.cc.py.
Related Issues (13)
- Non-ascii characters don't work HOT 2
- Show suggestions
- Configurable default languages HOT 2
- HTTP Error 403: Forbidden HOT 20
- They limited the result set to 3 words HOT 2
- SSLError
- Unicode error on umlauts since colorized output
- Documentation for usage as code HOT 1
- Can you explain in more detail, how to install and use this on OS X? HOT 2
- python warning HOT 3
- Invalid syntax on python 3.5 when installed via pip HOT 2
- unable to store the result in a bash variable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dict.cc.py.