B
B
badrbot2018-10-18 17:21:39
Python
badrbot, 2018-10-18 17:21:39

How to parse this image if it is not in the html file?

Here is the site: https://gdz-putina.net/5-klass-biologiya-pasechnik...
I wrote the code

def get_link(url):
    html = urllib.request.urlopen(url)
    soup = BeautifulSoup(html, 'html.parser').find('div', class_='task', id='task')
    links = []
    for i in soup.find_all('a', href=True):
        a = i['href']
        link = url + a
        links.append(link)
    return links

and it displays an empty list for me, but there is no link to the image in the source code of the site
<div id='media-6' class='media media-6 media-center'></div>
            <div class="task"
                 id="task"
                 data-host="//gdz-putina.net"
            ></div>

and on the site it is 5bc896d667c33824173071.pngHow do I parse a link to an image?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-10-18
@acrytzat

Parse with Selenium .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question