use beautifulsoup
#start from bs4 import BeautifulSoup import requests req = requests.get('https://www.slickcharts.com/sp500') soup = BeautifulSoup(req.text, 'html.parser')
use beautifulsoup
#start from bs4 import BeautifulSoup import requests req = requests.get('https://www.slickcharts.com/sp500') soup = BeautifulSoup(req.text, 'html.parser')
beautifulsoup find
htmlTag = soup.find(id="id") text = soup.find(id="id").get_text()
children beautiful soup
li = soup.find('li', {'class': 'text'}) children = li.findChildren("a" , recursive=False) for child in children: print child
The find() method in BeautifulSoup ____.
<div class="audit"> <div class="profile-info"> <img class="profile-pic" src="https://pbs.twimg.com/profile_images/471758097036226560/tLLeiOiL_normal.jpeg" /> <h4>Ed Boon</h4> <span class="screen-name"><a href="http://www.twitter.com/noobde" target="_blank">@noobde</a></span> </div> <div class="followers"> <div class="pie"></div> <div class="pie-data"> <span class="real number" data-value=73599>73,599</span><span class="real"> Real</span><br /> <span class="fake number" data-value=32452>32,452</span><span class="fake"> Fake</span><br /> <h6>Followers</h6> </div> </div> <div class="score"> <img src="//twitteraudit-prod.s3.amazonaws.com/dist/f977287de6281fe3e1ef36d48d996fb83dd6a876/img/audit-result-good.png" /> <div class="percentage good"> 69% </div> <h6>Audit score</h6>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us