DropDown Looping extraction

Hi all

I'm new to screen-scraping and before I spend hours going through the tutorials I just wanted to know if screen-scraper can do what I need it to do.

Ok, I need to scrape some values but before, i need to make a selection of 2 dropdown. On the selection of an option in the first dropdown, it submit a form, and it populate the second dropdown. The second dropdown submit the form again and display a link. I need to click on this link to get the information I need. My question is it possible to create a scrip able to do all those actions automatically even if I don't know the content of each Dropdown ?

is this possible?

thanks in advance !

DropDown Looping extraction

Hi

To answer your question :

Q: When you select from one does the page fully refresh or does another drop-down suddenly appear and/or populate based on your input?

A: [b]the page fully refresh[/b]

And unfortunately there is no alternative to that page (multi-page scenario)

:cry:

Thank a lot for your time !

-Jipi-

DropDown Looping extraction

-Jipi-,

I'm guessing that each of the drop-down lists are available from the main HTML source of that page. When you select from one does the page fully refresh or does another drop-down suddenly appear and/or populate based on your input?

If my guess is right you've got it easy in one sense and possibly harder in another. Easy because you only need to scrape from one page - no server request/response back-and-forth. Harder because it may be difficult to tell what initial input produces what ultimate output.

So, how do you determine the values for each Country/region combination? The answer may be disciphering the logic in their JavaScript (not fun). You could try visiting the page with JavaScript turned off and see if they offer an alternative to that page. Perhaps a more traditional, multi-page scenario.

I hope this helps.

Thanks,
Scott

DropDown Looping extraction

Ok this is an example:

[u]Step 1[/u]

HTML =

 <select class="iformCountryRegion" name="Country" onchange="window.document.CountryRegion.submit&#40;&#41;;" width="418" id="Country">
    <option value="0" selected>Select one</option>
    <option value="1">Canada</option>
    ...
    <option value="30">Ascension Island</option>
    <option value="31">Australia</option>
    ...
    <option value="60">United States</option>  
 </select>

 <select class="disabledDropDown" name="Region" width="402" id="Region" disabled="disabled">

[u]Step 2:[/u] I choose Canada then there is a submit and the second dropdown is published:

HTML is NOW =

<select class="iformCountryRegion" name="Country" onchange="window.document.CountryRegion.submit&#40;&#41;;" width="418" id="Country">
    <option value="0">Select one</option>
    <option value="1" selected>Canada</option>
    ...
    <option value="30">Ascension Island</option>
    <option value="31">Australia</option>
    ...
    <option value="60">United States</option>    
 </select>

 <select class="iformCountryRegion" name="Region" onchange="window.document.CountryRegion.submit&#40;&#41;;" id="Region" width="402">
    <option value="0" selected>Select one</option>
    <option value="1076">Alberta</option>
    <option value="4934">British Columbia</option>
     ...
    <option value="27068">Quebec</option>
    <option value="29926">Saskatchewan</option>
    <option value="37348">Yukon Territory</option>
 </select>        

After that, a link appear and I can click on it th get the Country/region description. Finally, My goal is to get that kind of info :

Canada;Alberta;Description of Alberta
[...]
United States;New York;Description of New York
[...]

So I want to extract the combination of each Country/region for all values in those drop down. And I don't want to give in input the list of the first Dropdown because in my case of study the content of the dropdown can be updated at anytime.

Can I automate that kind of things?

DropDown Looping extraction

-Jipi-

In theory, yes, but we would need to see an example of the scenario you're describing. Even if you just make up the values could you replicate the HTML code from step to step and post it here? Be sure to surround your code snippets with &#91;code&#93;<your code>&#91;/code&#93; It makes reading easier.

Thanks,
Scott