~goncharov-i-v/+junk/ForismaticApplet

« back to all changes in this revision

Viewing changes to forismatic_notify.py

  • Committer: Ivan Goncharov
  • Date: 2010-07-26 20:40:37 UTC
  • Revision ID: vanuch@vanuch-20100726204037-ynh54xrzwjosklej
litle fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
                </forismatic>
191
191
                """
192
192
                #TODO: add check of bad response
193
 
                self.lang = self.quote_lang()
 
193
                self.lang = u"".join(self.quote_lang())
194
194
                print self.lang
195
195
                params = urllib.urlencode({'method': 'getQuote',
196
 
                 'format': 'xml', 'lang': self.lang})
 
196
                 'format': 'xml','key': '','lang': self.lang },False)
 
197
                
197
198
                print params   #somesing wrong
198
 
                f =urllib.urlopen("http://www.forismatic.com/api/1.0/" , params)
 
199
                params2=u"".join('method=getQuote&format=xml&key=&lang=en')
 
200
                print params2
 
201
                f =urllib.urlopen("http://www.forismatic.com/api/1.0/",params2)
199
202
                quote_xml = f.read()
200
203
                #2)parseQuote:
201
204
                quoteText = "can not get quote"