Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a href="website" target="_blank" rel="nofollow" onmouseover="ddrivetip('<em>Thu, 21 Jun 2018</em> <br/> Disappointed coach Bert van Marwijk said Australia have to find the last part of the puzzle if they are to stay in the World Cup after a 1-1 draw with Denmark on Thursday. Australia captain Mile Jedinak hit a VAR-assisted penalty to earn the Socceroos first point in Russia after Christian Eriksens opener, giving Australia []')" ;="" onmouseout="hideddrivetip()">Australias Van Marwijk says last part of puzzle missing at World Cup</a>
- from bs4 import BeautifulSoup
- html = """
- <a href="website"
- target="_blank"
- rel="nofollow"
- onmouseover="ddrivetip('<em>Thu, 21 Jun 2018</em> <br/> Disappointed coach Bert van Marwijk said Australia have to find the last part of the puzzle if they are to stay in the World Cup after a 1-1 draw with Denmark on Thursday. Australia captain Mile Jedinak hit a VAR-assisted penalty to earn the Socceroos first point in Russia after Christian Eriksens opener, giving Australia []')" ;=""
- onmouseout="hideddrivetip()">
- Australias Van Marwijk says last part of puzzle missing at World Cup
- </a>
- """
- soup = BeautifulSoup(html, 'lxml')
- for a in soup.find_all('a'):
- print(a.text)
- Australias Van Marwijk says last part of puzzle missing at World Cup
- from bs4 import BeautifulSoup
- s = """<a href="website" target="_blank" rel="nofollow" onmouseover="ddrivetip('<em>Thu, 21 Jun 2018</em> <br/> Disappointed coach Bert van Marwijk said Australia have to find the last part of the puzzle if they are to stay in the World Cup after a 1-1 draw with Denmark on Thursday. Australia captain Mile Jedinak hit a VAR-assisted penalty to earn the Socceroos first point in Russia after Christian Eriksens opener, giving Australia []')" ;="" onmouseout="hideddrivetip()">Australias Van Marwijk says last part of puzzle missing at World Cup</a>"""
- soup = BeautifulSoup(s, "html.parser")
- print(soup.a.attrs['onmouseover'])
Add Comment
Please, Sign In to add comment