From ubuntu with python3 works, saves type fragments to the text.txt file
<p>ТЕКСТ1</p> <p>ТЕКСТ2</p>
, there is no windows to check from under it I can not.
#!/usr/bin/env python3 #-*- coding: utf-8 -*- from urllib.request import urlopen url="https://yandex.ru/referats/?t=astronomy+geology+gyroscope+literature+marketing+mathematics+music+polit+agrobiologia+law+psychology+geography+physics+philosophy+chemistry+estetica" page=urlopen(url).read().decode('utf-8') page_out="" oK=False for one in range(3,len(page)): if page[one-3:one]=="<p>": oK=True if page[one:one+4]=="</p>": oK=False if oK : page_out+=page[one] f=open('text.txt','w') f.write(page_out) f.close()