Re: Unable to connect a website using LWP



Bill Segraves wrote:
<prasanna_ssb@xxxxxxxxxxxxxx> wrote in message
news:1140687108.651391.276040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

Iam trying to connect to a website
ftp://ftp.rcsb.org/pub/pdb/data/structures/all/pdb/ to download files
from there. I am using LWP for the same and I am getting the following
Error

Why are you using LWP to try to download the files?

Because I need to download the entire pdb. Of course I could have
written a shell script for automatic getting the files by ftp, but
since I was learning Perl, I thought that LWP would be my best shot


If you point your browser to one level up in the directory hierarchy, e.g.,

ftp://ftp.rcsb.org/pub/pdb/data/structures/all/

you should be able to see the folders in said directory, among which is the
folder "pdb". While the permissions of the folders appear to allow you to
see the contents, the permissions of the files contained "in" the folders
may not be set to allow you to see the files.

Personally, I'd recommend that you enter through the "front door", e.g.,

http://www.rcsb.org

click on "Download Files" + "FTP Services", i.e.,

http://www.rcsb.org/pdb/static.do?p=download/ftp/index.html

and browse around a bit until you find the data you seek, *before* you
attempt to write a script to automate what you could simply do with your
browser.

I'll do this. There was another reason for the script by the way. My
prof. wants to get this data every month beginning or some such period
( essentially periodically) and obviously wants something which'd not
bother him (he might put this in the crontab file, for all I know).


Also, if you click on "FTP Services Help", you may find that the data you
seek is not where you thought it was, e.g.,

ftp://ftp.rcsb.org/pub/pdb/data/structures/divided/pdb/

Sorry!! the above path which I'd used in my program is just a trial
kind of thing. I've used this path which you've mentioned, in the code,
but I didnt post that part of the code since that was not the problem.


where I can see all the folders and the files within them.

Good luck!

Thank you.
--
Bill Segraves

.