Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

web query with Workbooks.Open("http:// .....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alex - 25 Mar 2008 07:54 GMT
I query a web page multiple times in a loop with a parameter to get different
pages. QueryTable does not get all the info I like.   Furthermore, it does
not work unless one put in a delay in order for excel to wait for the result.


Found the OPEN method in a book; Workbooks.Open("http:// .....
This method is more robust, does not need a delay.  I use .Find to parse
the page to get the data.
Just in case, I added a loop delay of about 10 seconds to avoid "issues"
related to server loading.  However, eventually got message in the opened
excel book which indicates that the server stopped me.  Once I got 100 hits
without problem.  Last time I got 7 when the special message showed up for
the first time.  Have not tested to see whether the server allows me again or
not.

Does the Workbooks.Open method behave different than a regular browser
click, apparently.  Is there a method where one can download the entire web
page without looking different than a regular web access (from the server's
perspective)?  I do not mind to have a long loop delay, e.g. 1 minute or more.

regards
Alex
Tim Williams - 26 Mar 2008 04:31 GMT
What message did you get?
Typically web sites will not (understandably) like being "scraped" and may
put measures in place to prevent people accessing too many pages in quick
succession.  These may apply both to browsers or to other tools such as
Excel.

Tim

>I query a web page multiple times in a loop with a parameter to get
>different
[quoted text clipped - 24 lines]
> regards
> Alex
Alex - 26 Mar 2008 05:13 GMT
Hi Tim. thanks for your intrest

The message in the Workbook sheet that is opened as a result of the OPEN
method was something like; A message was sent to the IT dep.".  

This is far from the exact message but the point is that they must have
understood that I accessed the web page in a different manner.   I could use
the excel function; =HYPERLINK(CONCATENATE("http:// ... with a parameter for
the particular web page to get the web page in the browser automatically and
this would be undetectable that it comes under program control if I have a
sufficiently large loop delay (fixed + random) but then I do not know how to
access the browser text from EXCEL .....  I can only program EXCEL, never
done any html or browser programing

> What message did you get?
> Typically web sites will not (understandably) like being "scraped" and may
[quoted text clipped - 32 lines]
> > regards
> > Alex
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.