K
K
Kirill Petrov2018-08-13 16:22:56
Python
Kirill Petrov, 2018-08-13 16:22:56

How to get link from style?

How can I get a link to an image? Unable to get nested url. Tried through regular expressions and attrs - nothing happened, None everywhere.

<div class="article__main-photo-img" style="background-image: url('https://example.ru/ufiles/pics/img-1234-1234567.jpg')"></div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton fon Faust, 2018-08-13
@Kirill_Kirillov

jsfiddle.net/anton4ept/2uvjLxpe
and then get the url as you want from the line. Though by means of split.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question