match = re.search(r"form: ({(\s+.*){1,}\})", response.text).group(1)
print(match)
Вывод:
{
"id":"Z3PvTW",
"title":"TESTING",
"theme": {
"id":"xwizbR",
"font":"Oswald",
"name":"Plain Blue (copy)",
"colors": {
"question": "#3D3D3D", "answer": "#000000", "button": "#000000", "background": "#FFFFFF"
}
,
"has_transparent_button":false,
"visibility":"private"
}
,
"workspace": {
"href": "https://api.helloWorld.com/workspaces/nutqqY"
}
,
"settings": {
"is_public":true,
"is_trial":false,
"language":"en",
"progress_bar":"proportion",
"show_progress_bar":true,
"show_helloWorld_branding":true,
"meta": {
"allow_indexing": false
}
}
,
"welcome_screens":[ {
"ref":"a13820db-af60-40eb-823d-86cf0f20299b",
"title":"TESTING VALUES",
"properties": {
"show_button": true, "button_text": "Start"
}
}
],
"thankyou_screens":[ {
"ref":"default_tys",
"title":"Done! Your information was sent perfectly.",
"properties": {
"show_button": false, "share_icons": false
}
}
],
"fields":[ {
"id":"kxWycKljdtBq",
"title":"FIRST NAME",
"ref":"27f403f7-8c5b-4e18-b19d-1501e8f137ee",
"validations": {
"required": true
}
,
"type":"short_text"
},
{
"id":"WEXCnZ7EAFjN",
"title":"LAST NAME",
"ref":"a6bf6d83-ee37-4870-b6c5-779822290cde",
"validations": {
"required": true
}
,
"type":"short_text"
}
],
"_links": {
"display": "https://autosnkr.helloWorld.com/to/Z3PvTW"
}
}
,
trackingInfo: {
"segmentKey": "9at6spGDYXelHDdz4r0cP73b3wV1f0ri", "accountId": 12587347, "accountLimitName": "Essentials", "userId": 12586030
}
Теперь о загрузке вашего JSONP
dict в действительный JSON
dict.
Проверьте, что key
, то есть trackingInfo
, фактически отсутствует trackingInfo
, чтобы быть как "trackingInfo"
. Так что вам нужно процитировать его, так как это будет считаться дубликатом. Пожалуйста, отметьте этот ответ