D
D
D55RUS2020-08-10 10:03:53
HTML
D55RUS, 2020-08-10 10:03:53

How to parse html and pull out a list of elements?

I need to parse all these elements:
5f30efe02adc7280156875.png

And pull out the url for each:
5f30f0f482b90621275348.png

Please tell me how to do this, I have already tried everything

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
datka, 2020-08-10
@D55RUS

1) Download Python
2) Install Beautifulsoup pip install bs4. as well as requests pip install requests, via Win+R or cmd
3) Here is the BeautifulSoup documentation , here is requests . Here are some code examples.
4) Write code through trial and error.
5) Profit.
This way you can get links

item = soup.find('a', class_="sih-inspect-magnifier")
print(item[href])

Then push it all into a loop.

D
Dmitry Shevchenko, 2020-08-20
@ZER0x32

there is a beautifulsoup library for this, it allows you to get all the tags and work with them conveniently

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question