Beautifulsoup: Parsen von html – Teil des href

Ich versuche zu analysieren

<td height="16" class="listtable_1"><a href="http://steamcommunity.com/profiles/76561198134729239" target="_blank">76561198134729239</a></td>

für die 76561198134729239. und ich kann nicht herausfinden, wie es zu tun. was habe ich versucht:

import requests
from lxml import html
from bs4 import BeautifulSoup
r = requests.get("http://ppm.rep.tf/index.php?p=banlist&page=154")
content = r.content
soup = BeautifulSoup(content, "html.parser")
element = soup.find("td", 
{
    "class":"listtable_1",
    "target":"_blank"
})
print(element.text)

InformationsquelleAutor nooby | 2017-01-18

Schreibe einen Kommentar