Coder Social home page Coder Social logo

siddharthsaxena / pycurrency-converter Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 43 KB

A python library to convert currency using Google Finance.

Home Page: http://siddharthsaxena.weebly.com/pycurrency-converter.html

License: GNU General Public License v3.0

Python 100.00%
python pycurrency-converter google-finance bs4 web-scraping

pycurrency-converter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

python3pkg

pycurrency-converter's Issues

HTTP Error 403: Forbidden

import PyCurrency_Converter as conv
conv.convert(1, 'USD', 'INR')
Traceback (most recent call last):
File "", line 1, in
File "/home/glebdom4/.local/lib/python3.6/site-packages/PyCurrency_Converter/PyCurrency.py", line 48, in convert
return PyCurrency.convert(amount, _from, _to)
File "/home/glebdom4/.local/lib/python3.6/site-packages/PyCurrency_Converter/PyCurrency.py", line 31, in convert
response = urllib2.urlopen(url)
File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python3.6/urllib/request.py", line 564, in error
result = self._call_chain(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 756, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python3.6/urllib/request.py", line 564, in error
result = self._call_chain(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 756, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

AttributeError: 'NoneType' object has no attribute 'text'

>>> import PyCurrency_Converter
>>> PyCurrency_Converter.convert(1, 'USD', 'INR')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/Work/venve2p/lib/python3.5/site-packages/PyCurrency_Converter/PyCurrency.py", line 48, in convert
    return PyCurrency.convert(amount, _from, _to)
  File "/home/Work/venve2p/lib/python3.5/site-packages/PyCurrency_Converter/PyCurrency.py", line 33, in convert
    parsed = BeautifulSoup(html, 'lxml').body.find('span', attrs={'class': 'bld'}).text
AttributeError: 'NoneType' object has no attribute 'text'
>>> 

python 3.5.3
beautifulsoup4-4.6.0
lxml-4.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.