coding utf-8 import urllib2 from BeautifulSoup import res urllib2 urlo

1
2
3
4
5
6
7
# -*- coding: utf-8 -*-
import urllib2
from BeautifulSoup import *
res = urllib2.urlopen('http://ya.ru/yandsearch?rpt=rad&text=Голые+бабы').read()
html = BeautifulSoup(res)
file('test.html', 'w').write(html)