from grab import Grab import grab print Version grab __version__ Grab

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from grab import Grab
import grab
print('Version: %s' % grab.__version__)
g = Grab(debug=True)
g.go('http://ya.ru')
g.go('http://ya.ru')
print(g.request_headers['Cookie'])
g.go('http://ya.ru', cookies={'foo': 'bar'})
print(g.request_headers['Cookie'])