Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help with parsing
#7
You should show code and error,also what you have tried.
As i stared testing in previous post,here is the code that should do it.
import requests
from bs4 import BeautifulSoup

url = 'https://connectedinvestors.com/member/jonathan-kessous/friends/2'
url_get = requests.get(url)
soup = BeautifulSoup(url_get.content, 'html.parser')
for tag in soup.find_all('h4', class_="card-name"):
    a_link = tag.find('a')
    print('-'*25)
    print(a_link.get('href'))
    print(a_link.text.strip())
Output:
------------------------- /member/jonathan-kessous Jonathan Kessous ------------------------- /member/devon-van-nostrand Devon Vannostrand ------------------------- /member/angelo-argentieri Angelo Argentieri ------------------------- /member/clayton-zelazowski Clayton Zelazowski ------------------------- .....ect
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