Есть у меня 10 сайтов с которых надо спарсить цены.
Пишу так
html страница имеет такой вид.
здесь 6 штук. Наш 1-й.
Нужно из всего этого получить строку которая будет <option value="ххххх" selected>
а в результате затолкать в файл цифру 3.67
Буду очень признателен за быстрый ответ
Пишу так
Код:
#include <IE.au3>
#Include <INet.au3> ;Подключаем библиотеку
$sLogin = 'domnnn.com'
$sUrl = 'https://secure.fatcow.com/register/registration.bml?masters=445&promos=dir_intr18_24&flowid=12&cid=951'
$oIE = _IECreate($sUrl)
$oLogin = _IEGetObjById($oIE, 'dom_lookup')
$oButton = _IEGetObjById($oIE, 'button')
_IEFormElementSetValue($oLogin, $sLogin)
_IEAction($oButton, 'click')
_IELoadWait($oIE)
sleep(4000)
; дальше пытался раскрутить код из этого примера http://autoit-script.ru/index.php/topic,10471.0.html, но...
$oElements = _IETagNameGetCollection($oIE, 'feature-row')
For $oElement In $oElements
If $oElement.value == '73291' Then
;ConsoleWrite(_IEPropertyGet($oElement, 'innertext'))
ExitLoop
EndIf
Next
MsgBox(0,"",$oElement.value)
html страница имеет такой вид.
Код:
<div class="displaybox reg-box registration-purchase-information registration-box">
<h2>Purchase Information</h2>
<input type="hidden" id="hostingprice" value="88.00">
<input type="hidden" id="hostingofferid" value="73291">
<table width="660">
<tr class="feature-row">
<td align="right"><label for="changefrequency_3">The FatCow Plan:</label></td>
<td align="left" id="freqDrop">
<select name="changefrequency_3" id="changefrequency_3" class="norm" onchange="updatesetup(this)"><option value="73290">$4.67 per month (billed $56.04 for 12 months)</option>
<option value="73291" selected>$3.67 per month (billed $88.00 for 24 months)</option>
<option value="73292">$3.67 per month (billed $132.00 for 36 months)</option></select> </td>
</tr>
<tr class="feature-row">
<td align="right">
<label>Instant Activation:</label>
</td>
<td align="left">
INCLUDED FREE!
</td>
</tr>
Код:
class="feature-row"
Нужно из всего этого получить строку которая будет <option value="ххххх" selected>
Код:
<option value="73291" selected>$3.67 per month (billed $88.00 for 24 months)</option>
Буду очень признателен за быстрый ответ