Nautilus uses, as per the freedesktop.org spec, an MD5 hex digest of the file’s URL as the thumbnail filename and keeps it as a PNG image in ~/.thumbnails/normal. To get this MD5 with pyton, use
md5.new("file:///file/path").hexdigest()
I write this here so I remember next time.
The article Finding a file’s nautilus thumbnail by marcoil, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.