Logo Search packages:      
Sourcecode: nautilus-image-manipulator version File versions  Download package

def nautilus_image_manipulator::upload::z1fichiercom::UploadSite::__init__ (   self )
Determines the url to upload to for 1fichier.com.

Documentation for 1fichier.com: http://www.1fichier.com/api/web.html
Note: it's not up to date...

Definition at line 24 of file z1fichiercom.py.

                      :
        """Determines the url to upload to for 1fichier.com.
        
        Documentation for 1fichier.com: http://www.1fichier.com/api/web.html
        Note: it's not up to date..."""
        # The session ID is read from the "files" form on http://www.1fichier.com
        html = urllib2.urlopen('http://www.1fichier.com').read()
        (sessionId) = re.search('<form enctype="multipart/form-data" id="files" action="http://upload\.1fichier\.com/upload.cgi\?id=(.*)" method="post">', html).groups()
        # Build the url to upload to and to retrieve the download and delete links:
        self.uploadUrl = "http://upload.1fichier.com/upload.cgi?id=%s" % sessionId
        self.endUploadUrl = "http://upload.1fichier.com/end.pl?xid=%s" % sessionId
    

Generated by  Doxygen 1.6.0   Back to index