fluquid / yandex-search Goto Github PK
View Code? Open in Web Editor NEWSearch library for yandex.ru search engine.
License: MIT License
Search library for yandex.ru search engine.
License: MIT License
Hello! I'm trying to use this module installed from pip in Gentoo (Gentoo Base System release 2.3) under IPython 5.3.0 with Python 3.5.3 and getting the following error:
KeyError Traceback (most recent call last)
in ()
----> 1 yandex.search('"Interactive Saudi"')
/home/kosc/.local/lib64/python3.5/site-packages/yandex_search/init.py in search(self, query, page, group_by_domain)
166 page=page,
167 group_by_domain=group_by_domain)
--> 168 return self._parse_xml(xml)
/home/kosc/.local/lib64/python3.5/site-packages/yandex_search/init.py in _parse_xml(self, xml)
140 """ parse information from xml into YandexResult object """
141 root = etree.XML(xml)
--> 142 self._raise_on_error(root)
143
144 # request = root.xpath('./request')
/home/kosc/.local/lib64/python3.5/site-packages/yandex_search/init.py in _raise_on_error(self, tree)
102 if errors:
103 error = errors[0]
--> 104 code = int(error.attrib['code'])
105 message = ' '.join(error.xpath('.//text()'))
106
src/lxml/lxml.etree.pyx in lxml.etree._Attrib.getitem (src/lxml/lxml.etree.c:68664)()
KeyError: 'code'
`
Results with more then 3 pages returns with parameter page=3 (0, 1 and 2 are ok) this exception
yandex_search.QueryException - Requested document too long.
Same query via https://yandex.com/search/xml works ok
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.