Из убунты с python3 работает, сохраняет в файл text.txt фрагменты типа
<p>ТЕКСТ1</p> <p>ТЕКСТ2</p>
, виндовс нет проверить из под нее не могу.
#!/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()