Jan-28-2023, 04:50 AM
Untested, but what about checking that
row
returns True
?for row in cur.execute("select id,introtext,fulltext from content"): if row: soup = BeautifulSoup(row["introtext"], 'lxml') file.write(soup.body.text)
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein