@@ -37,15 +37,16 @@ settings. However, the standard way is the following:
37engine file
37engine file
38-----------
38-----------
40−======================= =========== ===========================================
40+======================= =========== ========================================================
41argument type information
41argument type information
42−======================= =========== ===========================================
42+======================= =========== ========================================================
43categories list pages, in which the engine is working
43categories list pages, in which the engine is working
44paging boolean support multible pages
44paging boolean support multible pages
45language_support boolean support language choosing
45language_support boolean support language choosing
46time_range_support boolean support search time range
46time_range_support boolean support search time range
47−engine_type str ``online`` by default, ``offline``
47+engine_type str ``online`` by default, other possibles values are
48+ ``offline``, ``online_dictionnary``, ``online_currency``
48−======================= =========== ===========================================
49+======================= =========== ========================================================
50.. _engine settings:
51.. _engine settings:
@@ -111,22 +112,49 @@ passed arguments
111These arguments can be used to construct the search query. Furthermore,
112These arguments can be used to construct the search query. Furthermore,
112parameters with default value can be redefined for special purposes.
113parameters with default value can be redefined for special purposes.
115+If the ``engine_type`` is ``online```:
117+====================== ============== ========================================================================
118+argument type default-value, information
119+====================== ============== ========================================================================
126+headers.User-Agent str a random User-Agent
127+category str current category, like ``'general'``
128+safesearch int ``0``, between ``0`` and ``2`` (normal, moderate, strict)
129+time_range Optional[str] ``None``, can be ``day``, ``week``, ``month``, ``year``
130+pageno int current pagenumber
131+language str specific language code like ``'en_US'``, or ``'all'`` if unspecified
132+====================== ============== ========================================================================
135+If the ``engine_type`` is ``online_dictionnary```, in addition to the ``online`` arguments:
114====================== ============ ========================================================================
137====================== ============ ========================================================================
115argument type default-value, information
138argument type default-value, information
116====================== ============ ========================================================================
139====================== ============ ========================================================================
117−url string ``''``
140+from_lang str specific language code like ``'en_US'``
118−method string ``'GET'``
122−verify boolean ``True``
123−headers.User-Agent string a random User-Agent
124−category string current category, like ``'general'``
125−started datetime current date-time
126−pageno int current pagenumber
127−language string specific language code like ``'en_US'``, or ``'all'`` if unspecified
141+to_lang str specific language code like ``'en_US'``
142+query str the text query without the languages
128====================== ============ ========================================================================
143====================== ============ ========================================================================
145+If the ``engine_type`` is ``online_currency```, in addition to the ``online`` arguments:
147+====================== ============ ========================================================================
148+argument type default-value, information
149+====================== ============ ========================================================================
150+amount float the amount to convert
151+from str ISO 4217 code
153+from_name str currency name
154+to_name str currency name
155+====================== ============ ========================================================================
130parsed arguments
158parsed arguments
131----------------
159----------------
@@ -137,12 +165,12 @@ request:
137=================== =========== ==========================================================================
165=================== =========== ==========================================================================
138argument type information
166argument type information
139=================== =========== ==========================================================================
167=================== =========== ==========================================================================
140−url string requested url
168+url str requested url
141−method string HTTP request method
169+method str HTTP request method
142headers set HTTP header information
170headers set HTTP header information
143−data set HTTP data information (parsed if ``method != 'GET'``)
171+data set HTTP data information
144cookies set HTTP cookies
172cookies set HTTP cookies
145−verify boolean Performing SSL-Validity check
173+verify bool Performing SSL-Validity check
146max_redirects int maximum redirects, hard limit
174max_redirects int maximum redirects, hard limit
147soft_max_redirects int maximum redirects, soft limit. Record an error but don't stop the engine
175soft_max_redirects int maximum redirects, soft limit. Record an error but don't stop the engine
148raise_for_httperror bool True by default: raise an exception if the HTTP code of response is >= 300
176raise_for_httperror bool True by default: raise an exception if the HTTP code of response is >= 300