Sign in to follow this  
Followers 0
safdar19

How to download from a website by manipulating the ulr

7 posts in this topic

Hello friends.

I am trying to automate downloading from the website www.bseindia.com

the ulr is :::

http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES

I want to create an application which should ask the user to enter the script id and date range.

It should have the capability to import the list of script ids from a text file, and run at least run 5 threads of the ulr simultaneously.

In the above ulr the script id is 512093 and the date range is from 09/18/2000 to 0918/2010.

Is it possible to write a small programme ?

Safdar

Share this post


Link to post
Share on other sites



yes it's possible, easy even. Shouldn't take you more than 5 minutes once you've researched

InputBox()

Run()

maybe @ComSpec


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Hello friends.

I am trying to automate downloading from the website www.bseindia.com

the ulr is :::

http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES

I want to create an application which should ask the user to enter the script id and date range.

It should have the capability to import the list of script ids from a text file, and run at least run 5 threads of the ulr simultaneously.

In the above ulr the script id is 512093 and the date range is from 09/18/2000 to 0918/2010.

Is it possible to write a small programme ?

Safdar

Lurk the helpfile some more, find the topic type about what you're trying to do.

I'm sure there is a function or UDF for this.

Share this post


Link to post
Share on other sites

I have used inetget() with success.

Inetget("http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=01/18/2010&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES","E:\data\512093.csv")

It has given me a great deal of pleasure, as, me being a compleate newbee, this is my first ever code.

Now I will try to incorporate it somehow in to inputbox().

Thanks for the suggestions.

Safdar

Share this post


Link to post
Share on other sites

Kindly Help as I am not able to figure out how to replace "scripcd=512093" from the url to user defined input using iputbox()

$scripcd = InputBox("Question", "Enter the scrip Id")

when the user enters , say, 500410 the "scripcd=512093" in the url should change to 500410

http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES

Safdar

Share this post


Link to post
Share on other sites

Try this

$scripcd = "scripcd=" & InputBox("Question", "Enter the scrip Id")

MsgBox(4096, "Info", $scripcd);Note this just shows what it is

Share this post


Link to post
Share on other sites

when the user enters , say, 500410 the "scripcd=512093" in the url should change to 500410

http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES

Safdar

you could do like...

$firsturl = "http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES"
inetget(StringReplace($firsturl,"512093",InputBox("Scripcd","prompt"))

that assumes they're only going to give you the number you're looking for, and only the number has to change...

you could also do like...

$scripcd = InputBox("Question", "Enter the scrip Id")
_IECreate("http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=" & $scripcd & "&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES")

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0