Я пытаюсь загрузить файлы из HTML-источника.например,
<a class="el" href="classcs1graphics_1_1Circle.html">Circle</a>
<a class="el" href="classcs1graphics_1_1Polygon.html">Polygon</a>
Я получаю все hrefs, но я пытаюсь получить фактическое содержимое href.
Код ниже получает вышеупомянутый (много из них) и делает это быстро,Как я могу получить содержимое этих ссылок?Заранее спасибо.
Эд
import urllib.request, urllib.error, urllib.parse
from lxml import html
import requests
from bs4 import BeautifulSoup
#get the data from the URL
udata = requests.get('http://www.cs1graphics.org/doc/1.0/hierarchy.html')
#feed it to BeautifulSoup
soup = BeautifulSoup(udata.text,'html.parser')
#get all the <a table records
number_list_items = soup.find_all('a')
#get the rows in the records
for li_row in number_list_items:
print(li_row)