A
A
Alexander Kulaga2018-10-18 13:17:38
Python
Alexander Kulaga, 2018-10-18 13:17:38

How to get attribute from jinja2 template?

There is a list of strings: html and json templates
. You need to go through them and extract src values ​​from img tags and url values ​​from json templates from html templates.

To pull out img I use Beautiful Soup. What to use to process json?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-10-18
@AlexKulaga

generally json.loads but regexp does just as well

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question