Beautifulsoup code that is not running

P

Peter Pearson

This runs without an error, but nothing is written into the
extract.text file. test.html has <title></title> tags in it.

Hmm. Works for me, but of course I don't have your test.html.
Why don't you try examining "title" and "titleString"? Perhaps
<title></title> has resulted in titleString being the empty string.
 
Z

Zeynel

Yes, it shows as empty string. But I learned about Scrapy and now I am
studying the tutorial. I like it better than BeautifulSoup. For
beginners it is better, I think.

[snip]
This runs without an error, but nothing is written into the
extract.text file. test.html has <title></title> tags in it.

Hmm.  Works for me, but of course I don't have your test.html.
Why don't you try examining "title" and "titleString"?  Perhaps
<title></title> has resulted in titleString being the empty string.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top