Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

plxzm
Copy link

@plxzm plxzm commented Feb 27, 2023

No description provided.

@vshlykov
Copy link

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
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