response = requests.get("https://minfin.com.ua/currency/crypto/")
html = response.text
soup = BeautifulSoup(html, "lxml")
r2=re.compile('sc-18qu8it')
#find_name_href = soup.find_all(class_="sc-18qu8it-11 hZgTBs")
find_name_href=soup.find_all('a',{'class':r2})
pprint.pprint((find_name_href))
print ('/r/n')
for i in find_name_href:
j=i.get('href')
print (j)
project1=soup.find('table', summary='Краткое описание других проектов Фонда Викимедиа и ссылки на них')
project1
Out[14]:
<table align="center" cellspacing="2" class="plainlinks" style="text-align:left; width:90%; background:transparent; line-height:1.25em" summary="Краткое описание других проектов Фонда Викимедиа и ссылки на них">
<tbody><tr>
<td style="text-align:center; width:50px"><a href="//wikipedia.org"><img alt="Wikipedia-logo.png" data-file-height="200" data-file-width="200" decoding="async" height="20" src="//upload.wikimedia.org/wikipedia/commons/thumb/6/63/Wikipedia-logo.png/20px-Wikipedia-logo.png" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/63/Wikipedia-logo.png/30px-Wikipedia-logo.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/6/63/Wikipedia-logo.png/40px-Wikipedia-logo.png 2x" width="20"/></a>
....
p2=project1.find_all(href=re.compile('https:\/\/'))
for i in p2: print (i.get('href'))
https://wikipedia.org
https://commons.wikimedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0?uselang=ru
https://www.wikidata.org/wiki/Wikidata:%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0
https://meta.wikimedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0?uselang=ru
https://wikisource.org
https://wikibooks.org
https://wikiquote.org
https://incubator.wikimedia.org/wiki/Incubator:Main_Page/ru?uselang=ru
https://wikinews.org
https://wikivoyage.org
https://species.wikimedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0?uselang=ru
https://mediawiki.org/wiki/MediaWiki/ru?uselang=ru
https://wiktionary.org
https://wikiversity.org
In[2]: from bs4 import BeautifulSoup
In[3]: e='''<div class="col-md-9">
...: <span id="clock"></span>
...: <i class="far fa-clock small mr-1"></i>
...: " 2 days 16 hrs ago (Aug-24-2022 07:35:26 PM +UTC) "
...: </div>'''
In[4]: e
Out[4]: '<div class="col-md-9"> \n<span id="clock"></span> \n<i class="far fa-clock small mr-1"></i>\n" 2 days 16 hrs ago (Aug-24-2022 07:35:26 PM +UTC) "\n</div>'
In[7]: BeautifulSoup(e)
Out[7]:
<html><body><div class="col-md-9">
<span id="clock"></span>
<i class="far fa-clock small mr-1"></i>
" 2 days 16 hrs ago (Aug-24-2022 07:35:26 PM +UTC) "
</div></body></html>
In[8]: BeautifulSoup(e).text
Out[8]: '\n\n\n" 2 days 16 hrs ago (Aug-24-2022 07:35:26 PM +UTC) "\n'
link2=soup.findAll('source', label=('1080p','720p')) # или label='1080p'
link2
Out[7]:
[<source label="1080p" lang="ru" res="1080" src="https://r420203.kujo-jotaro.com/evangelion/3.1080.3e31d37bc4cef76b.mp4?hash1=be8049787056e7738662626b278da4dd&hash2=62a66b9265a79ec0e8299525e33b91ca" type="video/mp4"/>,
<source label="720p" lang="ru" res="720" src="https://r420203.kujo-jotaro.com/evangelion/3.720.c4258d66438b67df.mp4?hash1=85d66d38ea91c797807f15164e9c7c6f&hash2=c044017832e918ae2f231a52b329261d" type="video/mp4"/>]
link2[0]
Out[8]: <source label="1080p" lang="ru" res="1080" src="https://r420203.kujo-jotaro.com/evangelion/3.1080.3e31d37bc4cef76b.mp4?hash1=be8049787056e7738662626b278da4dd&hash2=62a66b9265a79ec0e8299525e33b91ca" type="video/mp4"/>
link2[0].get('src')
Out[9]: 'https://r420203.kujo-jotaro.com/evangelion/3.1080.3e31d37bc4cef76b.mp4?hash1=be8049787056e7738662626b278da4dd&hash2=62a66b9265a79ec0e8299525e33b91ca'
link.findAll('span')[0].get('data-player-1080') #или другой плеер, или возможно регексп или список тут как-то использовать
Out[20]: 'https://r208.kujo-jotaro.com/evangelion/3.1080.3e31d37bc4cef76b.mp4?hash1=f6957893c06e27e323f043075007f4cf&hash2=081c50cf272c6118adab7d27440958f8'
[{'cena': '\n \t 2\xa0345\xa0000\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-lx-570-vnedorozhnik-2011-g-v-probeg-117000-km-avtomat-5-7-l-advert740313755.html'},
{'cena': '\n \t 1\xa0200\xa0000\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-gx-470-vnedorozhnik-2004-g-v-probeg-133569-km-avtomat-4-7-l-advert750625481.html'},
{'cena': '\n \t 1\xa0320\xa0000\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-rx-270-vnedorozhnik-2011-g-v-probeg-115000-km-avtomat-advert749088541.html'},
{'cena': '\n \t 1\xa0500\xa0000\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-gs-250-sedan-2013-g-v-probeg-142145-km-avtomat-2-5-l-advert753188137.html'},
{'cena': '\n \t 1\xa0839\xa0999\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-lx-570-vnedorozhnik-2008-g-v-probeg-265000-km-avtomat-5-7-l-advert752860724.html'},
{'cena': '\n \t 845\xa0000\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-rx-350-vnedorozhnik-2006-g-v-probeg-196000-km-avtomat-3-5-l-advert752339702.html'},
{'cena': '\n \t 1\xa0400\xa0000\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-ls-460-sedan-2012-g-v-probeg-390000-km-avtomat-advert744369992.html'},
{'cena': '\n \t 3\xa0900\xa0000\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-lx-limuzin-2010-g-v-probeg-44000-km-avtomat-advert699227821.html'},
{'cena': '\n \t 3\xa0400\xa0000\xa0руб.\n \t ',
'link': 'https://irr.ru/cars/passenger/used/lexus-lx-570-vnedorozhnik-2013-g-v-probeg-75000-km-avtomat-advert753194033.html'}]