Skip to content

Added new parameter lr to the YandexXML class constructor.#24

Open
plxzm wants to merge 2 commits into
dbf256:masterfrom
plxzm:adding-a-search-region
Open

Added new parameter lr to the YandexXML class constructor.#24
plxzm wants to merge 2 commits into
dbf256:masterfrom
plxzm:adding-a-search-region

Conversation

@plxzm
Copy link
Copy Markdown

@plxzm plxzm commented Feb 27, 2023

No description provided.

@vshlykov
Copy link
Copy Markdown

vshlykov commented Mar 26, 2023

Внес эти правки в библиотеку и получил ошибку:

File "/opt/python/Python-3.11.0/v-env/lib/python3.11/site-packages/pyyaxml/search.py", line 55, in init
raise ValueError('Invalid domain. Valid domains are {}'.format(', '.join(self.VALID_DOMAINS)))
ValueError: Invalid domain. Valid domains are com.tr, ru, com

@plxzm
Copy link
Copy Markdown
Author

plxzm commented Mar 28, 2023

Пришлите пожалуйста пример запроса, тестировалось по

from pyyaxml.search import YaSearch
API_USER = ''
API_KEY = ''
LR_S = '213'
y = YaSearch(API_USER, API_KEY, LR_S)
results = y.search('питон', site='python.su', page=1)
if results.error is None:
for result in results.items:
print(result.url + ' ' + result.snippet)
else:
print(results.error.code + ' ' + results.error.description)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants