Я пытаюсь почистить некоторые данные с сайта с Selenium и Python 3, но сталкиваюсь с некоторыми проблемами.
Код сайта, с которого я пытаюсь получить информацию:
<uni-view data-v-13033eed="" class="select-container" style="height: 1777px;">
<uni-view data-v-13033eed="" class="size-list-wrap">
<uni-view data-v-13033eed="" data-section="0" data-row="0" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">36</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥3789</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="1" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">37.5</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥3899</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="2" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">38.5</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥3839</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="3" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">40</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥3479</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="4" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">41</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥3629</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="5" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">42.5</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥3869</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="6" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">44</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥4099</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="7" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">45</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥4409</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="8" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">46</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥4209</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="9" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">47.5</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥5079</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="10" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">48</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥--</uni-view>
</uni-view>
<uni-view data-v-13033eed="" data-section="0" data-row="11" data-item="[object Object]" class="select-size-info cover-info">
<uni-view data-v-13033eed="" class="size">48.5</uni-view>
<uni-view data-v-13033eed="" class="size-price">¥--</uni-view>
</uni-view>
</uni-view>
</uni-view>
Я хочу получить класс "size-price" и распечатать каждый найденный элемент. Мой код выглядит следующим образом:
find_price = driver.find_elements_by_class_name('size-price')
for item in find_price:
print(item.text)
Однако, возвращаются только 4 из 12 элементов.
Вот что я вижу в консоли:
¥4209
¥5079
¥--
¥--
Am Я что-то упустил?