Z
Z
zyusifov112020-12-15 23:12:36
Parsing
zyusifov11, 2020-12-15 23:12:36

How can I parse all links on a site?

it just find all
does not help in any way, since it parses all the links and there are a lot of button links on the site,
maybe you need some kind of xml? or filter all a href somehow to implement?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
europeexpress, 2020-12-16
@europeexpress

Recently I have been suffering. Here's the code, catch it bro.

list_ids = []
    soup = BeautifulSoup(r.text, 'lxml')
    for link in soup.find_all('хххxx', class_='хххxx'):
        list_ids.append(link.get('href').replace('что нужно поменять ', 'на что нужно поменять')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question