Пакет для работы с поисковыми системами Google, Yandex через сервис xmlriver.com
English description below
Привет! Добро пожаловать на страницу пакета xmlriver, который позволяет взаимодействовать по API с сервисом xmlriver.com и получать результаты выдачи из поисковых систем Яндекс и Google.
Установка
pip install xmlriver
Использование
import xmlriver
user = 000 #Ваш user_id со страницы https://xmlriver.com/queries/
key = '' #Ваш ключ со страницы https://xmlriver.com/queries/
google = xmlriver.Google(user, key)
query = 'Ваш запрос'
if google.request(query):
print(google.results)
Дополнительные параметры
Вы можете передавать дополнительные параметры, которые представлены на странице https://xmlriver.com/apidoc/api-about/ (для Google) и https://xmlriver.com/apiydoc/apiy-about/ (для Яндекс)
Можно доработать по примерам https://xmlriver.com/apidoc/api-organic/
Пример передачи параметров:
google = xmlriver.Google(user, key, country=10, device='desktop')
Или прямо в запросе:
google.query(query, country=10, device='desktop')
Доступные методы и атрибуты
- google.get_balance() - Получить информацию о балансе
- google.get_cost() - Получить стоимость за 1 000 запросов
- google.request(query, **kwargs) - Отправить запрос к Google
- google.pages - Число, количество найденных результатов
- google.results - Список найденных документов
- google.get_urls() - Список найденных URL
- google.get_titles() - Список заголовков результатов поисковой выдачи
- google.get_results_with_domain(domain, **kwargs) - Аналог запроса "domain" -site:domain. Выводит количество результатов
- google.is_trust_domain(domain, **kwargs) - Простая проверка домена на траст. True / False
- google.is_url_pessimised(url, **kwargs) - Проверка url на наличие фильтра - True / False. Перед этим проверьте, что URL проиндексирован
- google.is_url_indexed(url, **kwargs) - Проверка url на индексацию
- google.get_onebox_documents(query, types, **kwargs) - получить OneBox документы. Смотри https://xmlriver.com/apidoc/api-organic/#onebox
Поддержка
xmlriver использует пакеты requests и xmltodict и должен работать везде, где работает Python.
Автор
Иван Шарков Мой блог https://0pl.ru Моя организация: https://kurshub.ru
Package for working with search engines Google, Yandex via xmlriver.com service
Hi! Welcome to the xmlriver package page, which allows you to interact via API with xmlriver.com service and get results from Yandex and Google search engines.
Install
pip install xmlriver
Usage
import xmlriver
user = 000 #Your user_id from the page https://xmlriver.com/queries/
key = '' #Your key from page https://xmlriver.com/queries/
google = xmlriver.Google(user, key)
query = 'Your query'
if google.request(query):
print(google.results)
Additional parameters
You can pass additional parameters, which can be found at https://xmlriver.com/apidoc/api-about/ (for Google) and https://xmlriver.com/apiydoc/apiy-about/ (for Yandex).
Example of passing parameters:
google = xmlriver.Google(user, key, country=10, device='desktop')
Or directly in the query:
google.query(query, country=10, device='desktop')
Available methods and attributes
- google.get_balance() - Get balance information
- google.get_cost() - Get cost per 1,000 queries
- google.request(query, **kwargs) - Send a query to Google
- google.pages - Number, number of results found
- google.results - List of documents found
- google.get_urls() - List of URLs found
- google.get_titles() - List of titles of search results
- google.get_results_with_domain(domain, **kwargs) - Analogous to the query "domain"-site:domain. Outputs the number of results
- google.is_trust_domain(domain, **kwargs) - Simple domain trust check. True / False
- google.is_url_pessimized(url, **kwargs) - Check url for filter - True / False. Before doing this, check that the url is indexed
- google.is_url_indexed(url, **kwargs) - Check url for indexing
- google.get_onebox_documents(query, types, **kwargs) - get OneBox documents. See https://xmlriver.com/apidoc/api-organic/#onebox
Support
xmlriver uses the requests and xmltodict packages and should work wherever Python is running.
Author
Ivan Sharkov My blog: https://0pl.ru My organization: https://kurshub.ru
Metadata
Release files for xmlriver 0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xmlriver-0.14.tar.gz | 20.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xmlriver-0.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.0 kB
Release files / xmlriver-0.14.tar.gz
| Download URL | xmlriver-0.14.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20c24438a50fbeadb3bba98ac59be9494d4fb23ab65fd6f438c24d8d089022af
|
|
BLAKE2b-256 checksum How to use checksums |
a4fd689071d480917acf1fa92872acbc1f7354ee64df7b45a46e07a5ce125947
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.10
|
Release files / xmlriver-0.14-py3-none-any.whl
| Download URL | xmlriver-0.14-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a11542791ac2c00afef957aac77c4bb70bb298ffa3fb98c1d150135f52d799c
|
|
BLAKE2b-256 checksum How to use checksums |
d7c041a7dbf3a0c5548ffbac97f632601ff209fd68ec3e94c074a897810f4381
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.10
|