Python
3
Вклад в тег
url = 'https://mintrans.sakhalin.gov.ru/about/rezultaty-dejatelnosti/reestry/'
user_agent_val = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36'
r = requests.get(url, headers = {
'User-Agent': user_agent_val
})
<div class="question__body">
<div class="question__text js-question-text" itemprop="text description">
<img src="https://habrastorage.org/webt/60/91/0a/60910a6801390065654856.png" alt="60910a6801390065654856.png"> </div>
<ul class="question__attrs inline-list">
<li class="inline-list__item inline-list__item_bullet">
<span class="question__pub-date">
Вопрос задан
<time pubdate="" itemprop="dateCreated" datetime="2021-05-04 11:49:52" title="Дата публикации: 04 мая 2021, в 11:49">
8 часов назад </time>
</span>
</li>
<li class="inline-list__item inline-list__item_bullet">
<span class="question__views-count question__views-count_full">40 просмотров</span>
</li>
</ul>
</div>
driver.find_element_by_css_selector('div a[style]')