Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help with parsing
#5
Give it try,look at Web-Scraping part-1.
Here some hints.
h4 class="card-name" has all info about one card.
>>> tag_h4 = soup.find('h4', class_="card-name")
>>> tag_h4
<h4 class="card-name" itemprop="founder">
<a href="/member/derek-hodge" itemprop="url">
                            DEREK HODGE                        </a>
</h4>
>>> 
>>> a = tag_h4.find('a')
>>> a.get('href')
'/member/derek-hodge'
>>> 
>>> # There is also text in this a tag
>>> a.text.strip()
'DEREK HODGE'
Reply


Messages In This Thread
Need some help with parsing - by jkessous - Jan-19-2020, 07:34 PM
RE: Need some help with parsing - by Axel_Erfurt - Jan-19-2020, 08:40 PM
RE: Need some help with parsing - by snippsat - Jan-19-2020, 09:37 PM
RE: Need some help with parsing - by jkessous - Jan-19-2020, 09:45 PM
RE: Need some help with parsing - by snippsat - Jan-19-2020, 10:04 PM
RE: Need some help with parsing - by jkessous - Jan-19-2020, 10:51 PM
RE: Need some help with parsing - by snippsat - Jan-20-2020, 12:44 AM
RE: Need some help with parsing - by jkessous - Jan-20-2020, 12:48 PM
RE: Need some help with parsing - by snippsat - Jan-20-2020, 06:12 PM
RE: Need some help with parsing - by jkessous - Jan-20-2020, 06:40 PM
RE: Need some help with parsing - by snippsat - Jan-21-2020, 12:18 AM
RE: Need some help with parsing - by jkessous - Jan-21-2020, 05:48 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020