Re: Enable script in HTTPWebRequest



Hi,
OK, again. I will try to be more clear.
1. I download the page with HTTPWebRequest, and I expect right data, which i
have when i use a browser, to parse some data from the page.
2. Answer from the page is (without HTML tags):

Please activate scripting
Scripting must be enabled before you can continue.
To enable scripting, you need to make a simple adjustment to your browser
settings.

Click here if you need more help with your browser.
After you have enabled scripting refresh this page.

3. I want to avoid this message and to collect data which i expect (like in
a browser)

"Kevin Spencer" wrote:

> Hi gorkos,
>
> I'm still having trouble understanding, but maybe it's a language barrier
> thing. Let me try to ask a couple of questions.
>
> 1. You say you need to download a page using HTTPWebRequest. That's pretty
> clear.
>
> 2. What do you mean by "Page requires to have Script enabled?" Apparently,
> something is happening which seems to indicate this to you. What exactly is
> it? What I mean is, an HTML document is a pretty straightforward text
> document. All it contains is text. Any other resources in the page are
> obtained via the browser making other requests, for images, other binary
> resources, external scripts or stylesheets, etc. So, when you say "Page
> requires to have Script enabled" I don't know what you're describing.
>
> I get the feeling that you're trying to obtain something that is not IN the
> HTML document you're requesting, but another resource that may be contained
> in the page as a tag of some kind. But I can't tell for sure.
>
> You also made some reference to some kind of "Error." Can you be more
> specific about the nature of the "Error?"
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Ambiguity has a certain quality to it.
>
> "gorkos" <gorkos@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:A659A0B7-2B39-4F08-94F1-6D4A04507DA2@xxxxxxxxxxxxxxxx
> > Yes, thx for the lesson, exactly is something like this:
> >
> > 1. I need to download a page using HTTPWebRequest and than parse request;
> > 2. Page requires to have Script enabled;
> > 3. I suppose that script should be execute only after some user action (no
> > onLoad or else script).
> > 4. So, for my purpose, for me is just enough if i can on someway simulate
> > than script is enabled, using HTTPWebRequest, to get full answer from site
> > (complete page)
> >
> > "Kevin Spencer" wrote:
> >
> >> The first step to solving a problem is to define the problem clearly and
> >> completely. It is not possible to proceed with a solution until this
> >> first
> >> step is completed.
> >>
> >> --
> >> HTH,
> >>
> >> Kevin Spencer
> >> Microsoft MVP
> >> ..Net Developer
> >> Ambiguity has a certain quality to it.
> >>
> >> "gorkos" <gorkos@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:C40D086B-660D-422D-9E6E-7D0BA24074BD@xxxxxxxxxxxxxxxx
> >> > Hi,
> >> > I am two days trying to solve a problem with some pages, which i get
> >> > through
> >> > HTTPWebRequest. Error is that some pages need Script to be enabled. But
> >> > how
> >> > to do this in HTTPWebRequest class?
> >>
> >>
> >>
>
>
>
.


Loading