coding utf-8 import urllib2 from BeautifulSoup import BeautifulSoup re

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