Jump to content

INetGetSource


jezzzzy
 Share

Recommended Posts

I'm doing this:

$Web = _INetGetSource($wURL)

$Web then contains the source code for $wURL. However, some items are missing. Specific example here:

My website has this line when viewed by "view source" in the browser:

<div id="ctl00_ctl00_ContentPlaceHolderLeadIn_ContentPlaceHolderLeadIn_SaleControl_PanelProgressBarValue" class="ProgressBarValue" style="width:97%;">

But the $Web version of this line reads like this:

<div id="ctl00_ctl00_ContentPlaceHolderLeadIn_ContentPlaceHolderLeadIn_SaleControl_PanelProgressBarValue" class="ProgressBarValue">

The style="width:97%;" portion is stripped in my $Web variable. Any ideas why this is happening?

In short, I'm trying to pull the 97. But if the 97 isn't in the string, .... well you see my problem.

Edited by jezzzzy
Link to comment
Share on other sites

I'm doing this:

$Web = _INetGetSource($wURL)

$Web then contains the source code for $wURL. However, some items are missing. Specific example here:

My website has this line when viewed by "view source" in the browser:

<div id="ctl00_ctl00_ContentPlaceHolderLeadIn_ContentPlaceHolderLeadIn_SaleControl_PanelProgressBarValue" class="ProgressBarValue" style="width:97%;">

But the $Web version of this line reads like this:

<div id="ctl00_ctl00_ContentPlaceHolderLeadIn_ContentPlaceHolderLeadIn_SaleControl_PanelProgressBarValue" class="ProgressBarValue">

The style="width:97%;" portion is stripped in my $Web variable. Any ideas why this is happening?

In short, I'm trying to pull the 97. But if the 97 isn't in the string, .... well you see my problem.

You are seeing the difference between the server-side HTML that your browser downloads, and the client-side HTML after the browser runs client-side scripting on the page. The _IE* functions of the IE.au3 UDF work on the client-side document object in IE. You have seen that _INetGetSource() pulls the raw source from the server.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Didn't think that the in-line "style" in my example code would be affected by that. I'm trying to avoid using the IE UDF since I would like my script to work on machines that do not have IE. Any thoughts?

Edited by jezzzzy
Link to comment
Share on other sites

PSalty,

Looks like other in-line style attributes are intact. Here's an example from the same source:

<div id="loggedIn" style="display:none;">

I'm not challenging your response, I just need help understanding. Can't figure out why one style would be stripped but others remain.

Link to comment
Share on other sites

PSalty,

Looks like other in-line style attributes are intact. Here's an example from the same source:

<div id="loggedIn" style="display:none;">

I'm not challenging your response, I just need help understanding. Can't figure out why one style would be stripped but others remain.

Since I don't know the web page you are interested in, there is no way to know for sure. My theory was not that anything was stripped, rather client-side processing ADDED things that are not present in the server-side source.

Another layer of this kind of abstraction comes from server-side scripting, where elements would normally be changed on the server side based on browser ID, etc. Using INetGet would throw that off also.

I'm not a web-design guy, and so not qualified to give you very concrete examples.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

The URL is woot.com. If you hit the site today, during the wootoff, you will see the progress bar that I can't seem to capture.

If it would help to see the script, here's the location (i've posted this previously to the "Example Scripts" group):

You can download here: www.w-woot.com

Note: script has a pseudo-installer function (adds a program group, control panel uninstall group, and a temp folder for storing settings) - I know some don't like installers.

Edit: added script download location

Edited by jezzzzy
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...