I take an example from the documentation ( http://docs.grablib.org/ru/latest/grab/text_search.html#id2 ) and just copy it. He does not work. An error is issued
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/grab/util/warning.py:28: GrabDeprecationWarning: Call to deprecated function search. Use grab.doc.text_search instead. warn(message)
All code:
from grab import Grab g = Grab() url = 'https://news.yandex.ru/index.rss' g.go(url) g.search(u'яндекс'.encode('utf-8'), byte=True)
g.doc.text_search
. The second point - try to search for "Yandex" (with a capital letter). The third point - try to print out what the method returns - awesoon