عملکرد این تابع تعریف شده رو متوجه نمیشم

سوال

def find_links_article(html_page):

try:

links = []
page_soup = BeautifulSoup(html_page , “html.parser”)
for li_tag in page_soup.find_all(‘div’, {‘class’: ‘col-md-4’}):
for span_tag in li_tag.find_all(‘div’, {‘class’: ‘box’}):
for spans in span_tag.find_all(‘li’, {‘class’: ‘liny’}):
for tag_a in spans.find_all(‘a’, href=True):
l = str(setup.url + tag_a.get(‘href’))
links.append(l)
return links

except Exception as e:
print(“find_links_article!!! ” + str(e))

0
yasigh387 2 سال 0 پاسخ ها 110 دیده شده 0

ارسال یک پاسخ