Hello everyone,
i want to read URL Value of rss feed from user and then get data from 
respective feed. For that i m using web.py and form value but i am getting 
error 
"need more than 1 value to unpack"


my web.py code is:

class Feed(object):

    def GET(self):
        return render.get_text()

    def POST(self):
        form = web.input(paragraph2="None")
        textToBeAnalysed1 = "%s" % (form.paragraph2)
        #print textToBeAnalysed1
        service = SentimentAnalyzingService()
        textToBeAnalysed = service.feedvalue(textToBeAnalysed1)

        scoreOfSentimentAnalysis = 
service.performBasicSentimentAnalysis(textToBeAnalysed)
        return render.show_sentiment(scoreOfSentimentAnalysis)


and html template code is:

<h1>Insert RSS feed to analyze sentiment.</h1></center>
    <br />
    <form method="post" action="/Feed">
    <center>
            <!-- <input name="url" id="url" value="Type URL here" 
type="text"/> -->
            <input name="paragraph2" id="status" value="Type something here 
to analyze" type="text"/>
            <input type="submit" style="margin-leftt: 10px;padding-left:5 
cm;" class="button_example3" value="Analyze"/>
    </center>
     
    </form>


Analyzing code is:

def feedvalue(self,url):
        for result in Newsfeed().search(url)[:15]:
         s= plaintext(result.description, keep={})
         m = repr(result.title) + '\n' + s
         #print m
         return m

 The flow is user enter url from form data and this url is passed to 
analyzing code which returns rss feed data of title and description.but i 
am getting error 
<type 'exceptions.ValueError'> at /Feed need more than 1 value to unpack


so please help me...your help would be very much helpful.

Thanks and regards,

Saifee



-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to webpy+unsubscr...@googlegroups.com.
To post to this group, send email to webpy@googlegroups.com.
Visit this group at http://groups.google.com/group/webpy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to