473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Saving tif file from tricky webserver

Greetings,

I am attempting to automate accessing and saving a file (a TIF) from
the following URL:

http://patimg1.uspto.gov/.DImg?Docid...y=E21184B8FAD5

I have tried some methods using urllib, httplib, and
web32com.client(InternetExplorer), but haven't been successful.
Currently I am using (in Python 2.5)

import webbrowser

url = [see above]

webbrowser.open(url, new=0, autoraise=0)

When this is run a windows popup dialog opens asking me to Open, Save,
or Cancel. However, if I query multiple such URLs, I do not want to
have to respond manually. Is there a way I can use Python to save the
TIF?
Jun 27 '08 #1
1 1393
schweet1 schrieb:
Greetings,

I am attempting to automate accessing and saving a file (a TIF) from
the following URL:

http://patimg1.uspto.gov/.DImg?Docid...y=E21184B8FAD5

I have tried some methods using urllib, httplib, and
web32com.client(InternetExplorer), but haven't been successful.
Currently I am using (in Python 2.5)

import webbrowser

url = [see above]

webbrowser.open(url, new=0, autoraise=0)

When this is run a windows popup dialog opens asking me to Open, Save,
or Cancel. However, if I query multiple such URLs, I do not want to
have to respond manually. Is there a way I can use Python to save the
TIF?
You need to figure out what really becomes the download url, and use
that. Use e.g. http live headers for firefox to get that information.

If the server needs the form-submitting stuff to actually grant access
to the TIFF, you might need to use mechanize to talk to the site as if
you were a browser.

Diez
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: ian.irlandez | last post by:
Hey all, I'm trying to execute a bat file on the server in javascript. The javascript sits on the server as well. I'm currently using: document.location.href='testme.bat'; However the only...
0
by: andrewwebley | last post by:
I have a web application that enables a user to download a word or excel file. I want them to be able to edit the file and then when they close the file I then update the image that contains the...
3
by: Paul Louth | last post by:
Hi, I'm looking for a bit of advice. I have word-docs saved in a SQL Server database on my web-server. I would like to either stream this to a web-form directly or open it from a temporary file...
12
by: tjonsek | last post by:
I get a generic error (not very helpful) when attempting to save a re-sized image back to its original location. Here is the code snippet: Dim g As System.Drawing.Image =...
2
by: Michael | last post by:
We have an ASP.NET 2.0 web application running on a Windows 2003 domain controller. Part of that application needs to read and write files from and to a network share ( living on a MAC Xserveraid)...
3
by: sameer | last post by:
Hi all, ..net framwork 1.1 sql server 2000 I have a vb.net winforms application using webservices\ remoting to upload documents\ images to the webserver and i am gong to store them in the sql...
0
by: sameer | last post by:
Hi all, ..net framwork 1.1 sql server 2000 I have a vb.net winforms application using webservices\ remoting to upload documents\ images to the webserver and i am gong to store them in the sql...
7
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
1
by: samelamin | last post by:
Hello, I was wondering if anyone could help me in this really tricky issue i have been working on. I am working with a programs APIs that receives parameters and then excutes commands and gives back...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.