Claudio, thank you very much for your extremely simple and ready to use script.
I read you found issues using the "filter/discussion" stream, I used the "filter/discussions" (with the extra 's') and it downloaded data but not all, so I changed this to <my_id>/likes and <my_id>/discussions and it seems to work.