Apr-25-2021, 04:36 PM
(Apr-25-2021, 01:57 PM)jimsxxl Wrote: There are 2 exactly the same blocks of code on Youtube:Use CCS selector to get exact tag,in browser first
inspect
right click Copy ➡ Copy ➡ Selector
In BS then you use
select()
or select_one()
.1 2 |
view_count = soup.select_one( '#metadata-line > span:nth-child(1)' ) print (view_count.text) |
Output:Sett 18k ganger