how to use extractor/sub-extractor pattern data table

I am scraping a web page that contains both a known session variable and an unknown string that I need to assign to a session variable that can be used as a parameter in a later url request.

I am using DATARECORD as my extractor pattern and APP_ID_DESCR_PRS and DISPLAY_ID as my sub-extractor patterns.

Since the webpage contains multiple listings that match my extractor pattern criteria, I get a table with 4 or 5 rows of data. My session variable matches one of the APP_ID_DESCR_PRS and I need to get the associated DISPLAY_ID assigned to a session variable that I can use as a parameter later on.

So I need to know how the items in the table are associated and how to operate on them.

<tr>
<td class="name"><strong>E6V43P96W9.com.fantrail.testartist1</strong><br />
test artist1 fantrail</td>
<td class="profile" style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_orange.png" />Configurable for Development<br />
 <img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_orange.png" />Configurable for Production<br />
 </td>
<td style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_green.png" />Enabled</td>
<td style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_green.png" />Enabled</td>
<td style="vertical-align:middle"><a id="index_" href="/ios/manage/bundles/configure.action?displayId=F73UC7793T" class="modify">Configure</a> </td>
</tr>

<tr>
<td class="name"><strong>VJNYDA5856.com.fantrail.testartist2</strong><br />
test artist2 fantrail</td>
<td class="profile" style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_orange.png" />Configurable for Development<br />
 <img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_orange.png" />Configurable for Production<br />
 </td>
<td style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_green.png" />Enabled</td>
<td style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_green.png" />Enabled</td>
<td style="vertical-align:middle"><a id="index_" href="/ios/manage/bundles/configure.action?displayId=DP8SR446FN" class="modify">Configure</a> </td>
</tr>

My initial extractor pattern

My initial extractor pattern is:

~@DATARECORD@~

and my sub-extractor patterns are:


~@APP_ID_DESCR_PRS@~

and
displayId=~@DISPLAY_ID@~"

tasselhawf, Could I get you

tasselhawf,

Could I get you to post some sample HTML from the last response of the scrapeable file you're working with?

Please be sure to surround your sample code with <code></code> tags.

Thanks,
Scott

tasselhawf, Unless the number

tasselhawf,

Unless the number of td's between each set of tr's will vary i wouldn't bother with using the DATARECORD special token and sub-extractors. Instead, I would do something like this. It seemed to work with your example HTML.

<tr>
<td class="name"><strong>~@TITLE@~</strong><br />
~@SUBTITLE@~</td>
<td class="profile" style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_~@COLOR_01@~.png" />~@DESCRIPTION_01@~<br />
 <img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_~@COLOR_02@~.png" />~@DESCRIPTION_02@~<br />
 </td>
<td style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_~@COLOR_03@~.png" />~@DESCRIPTION_03@~</td>
<td style="vertical-align:middle"><img width="16" height="16" class="inline_icon" alt="Provisioning Profile Icon" src="http://devimages.apple.com/assets/apps/images/portal/icon_status_~@COLOR_04@~.png" />~@DESCRIPTION_04@~</td>
<td style="vertical-align:middle"><a id="index_" href="/ios/manage/bundles/configure.action?displayId=~@DISPLAY_ID@~" class="~@nondblqts@~">~@ACTION@~</a> </td></tr>

If you need to use sub-extractors you can put each td in it's own sub-extractor.

Hope this helps.
-Scott