View Single Post
Old 03-05-2011, 10:32 AM   #1
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,730
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Temp files cleanup

I'm moving an email conversation with Kovid here...

I am working on the next version of my Search the Internet plugin, which will allow specifying a url that will be submitted via HTTP POST as some websites require that.

Kovid has suggested using mechanize to perform the POST, grab the response, write it to a temp file and launch the browser. The potential issue I have with this is knowing when I could delete the temp files?

The other idea I had was to write a temp file with a fake form in it and javascript to submit the form using onload. That way I know I can safely delete the temp file after opening in the launched browser. I've got this working, but of course it would not work for users who disable javascript in their browser. How prevalent that is I have no idea.

Can anyone suggest which approach to take?
kiwidude is offline   Reply With Quote