Updated 2022-05-21 2
Viewed 6 times
0

how to get this value i was trying to get The value of "src":"...." from response.text but didn't found any way, How i can do it?

enter image description here

🔴 No definitive solution yet
📌 Solution 1
0

You could use Regular Expression to get the relevant string. For example

res = """
<link type="text/css" rel="stylesheet" href="https://vk.com/css/api/oauth_popup.98ea88a667e23b0d6ec1.css" />
<script type="text/javascript" language="javascript" src="https://v-k.com/js/api/common_light.js?2"></script>
<script type="text/javascript" language="javascript">
"""
import re
print('src=' in res)
re.findall('src=\".*\"', res)

Output

True
['src="https://v-k.com/js/api/common_light.js?2"']
📌 Solution 2
0

Seems like you have a Dict returned in res.text.

To get the value, you have to know the key.

1st step: get the key-value pairs:

    for key in res.text
       print (key, res.text[key])