Я получаю словарь с помощью парсинга Selenium и в нём есть значения null. Из-за этого конструкция eval() выдаёт ошибку. Можно ли как-то указать что б значения null изменялись на другие или ещё как-то избежать ошибки.
P.S.
csmoney_skin_script_raw = str(driver.find_element_by_css_selector('html body script#__NEXT_DATA__').get_attribute('innerHTML'))
csmoney_skin_script = eval(csmoney_skin_script_raw)
print(csmoney_skin_script)
Вот тот самый словарь:
{"props":{"pageProps":{"initialApolloState":{"ROOT_QUERY":{"__typename":"Query","skin({\"input\":{\"id\":\"m4a1-s-printstream\"}})":{"_id":"m4a1-s-printstream","name":"M4A1-S | Поток информации","hash_name":"M4A1-S | Printstream","rarity":"Covert","type":"StatTrak™","slug":"/weapons/m4a1-s/printstream","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhz2v_Nfz5H_uO1gb-Gw_alIITBhGJf_NZlmOzA-LP5gVO8vywwMiukcZice1M9ZViD-ATrle7v15O46cifzHFhunZ243yInxW-10sZOrBp1qTLVxzAUNxEoFAP","weapon_id":"m4a1-s","wear_limits":[0,0.8],"youtube_id":null,"exteriors":["Factory New","Minimal Wear","Field-Tested","Well-Worn","Battle-Scarred"],"name_ids":[{"name":"M4A1-S | Printstream (Factory New)","name_id":1083447},{"name":"M4A1-S | Printstream (Minimal Wear)","name_id":1083542},{"name":"M4A1-S | Printstream (Field-Tested)","name_id":1083627},{"name":"M4A1-S | Printstream (Well-Worn)","name_id":1083960},{"name":"M4A1-S | Printstream (Battle-Scarred)","name_id":1083810},{"name":"StatTrak™ M4A1-S | Printstream (Factory New)","name_id":1083703},{"name":"StatTrak™ M4A1-S | Printstream (Minimal Wear)","name_id":1083619},{"name":"StatTrak™ M4A1-S | Printstream (Field-Tested)","name_id":1083736},{"name":"StatTrak™ M4A1-S | Printstream (Well-Worn)","name_id":1084088},{"name":"StatTrak™ M4A1-S | Printstream (Battle-Scarred)","name_id":1083831}],"images":{"fn":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhz2v_Nfz5H_uO1gb-Gw_alIITBhGJf_NZlmOzA-LP5gVO8vywwMiukcZice1M9ZViD-ATrle7v15O46cifzHFhunZ243yInxW-10sZOrBp1qTLVxzAUNxEoFAP","mw":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhz2v_Nfz5H_uO1gb-Gw_alIITBhGJf_NZlmOzA-LP5gVO8vywwMiukcZice1M9ZViD-ATrle7v15O46cifzHFhunZ243yInxW-10sZOrBp1qTLVxzAUNxEoFAP","ft":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhz2v_Nfz5H_uO1gb-Gw_alIITBhGJf_NZlmOzA-LP4jVC9vh4DPzixc9OLI1dsNQ3Z_1i2kOjsgse7uZ_Ay3Nm7iFx7CncyRe-hExNZ-ZnhP3MTkLeWfLq5YrPNg","ww":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhz2v_Nfz5H_uO1gb-Gw_alIITBhGJf_NZlmOzA-LP4jVC9vh4DPzixc9OLI1dsNQ3Z_1i2kOjsgse7uZ_Ay3Nm7iFx7CncyRe-hExNZ-ZnhP3MTkLeWfLq5YrPNg","bs":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhz2v_Nfz5H_uO1gb-Gw_alIITBhGJf_NZlmOzA-LP9jVWisiwwMiukcZjDcwA9ZF_Z81brk-a6hJHouprKyXBkuSgktnrYykDhiElJbeZv1vOWVxzAUNZ56P8B"},"with_pattern_difference":false,"containers":[{"_id":"operation-broken-fang-case","name":"Кейс операции «Сломанный клык»","slug":"/cases/operation-broken-fang-case","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXU5A1PIYQNqhpOSV-fRPasw8rsUFJ5KBFZv668FFU3naeZIWUStYjgxdnewfGmZb6DxW8AupMp27yT9IqiilCxqkRkZGyldoaLMlhp6IQjKcg"}],"famous_players":[],"price":{"common":{"min":51.37,"max":323.66},"special":{"min":93.36,"max":773.25}},"collection":[{"_id":"the-operation-broken-fang-collection","name":"Коллекция операции «Сломанный клык»","slug":"/collections/the-operation-broken-fang-collection","items":[{"name":"M4A1-S | Поток информации","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhz2v_Nfz5H_uO1gb-Gw_alIITBhGJf_NZlmOzA-LP5gVO8vywwMiukcZice1M9ZViD-ATrle7v15O46cifzHFhunZ243yInxW-10sZOrBp1qTLVxzAUNxEoFAP","slug":"/weapons/m4a1-s/printstream","rarity":"Covert"},{"name":"Glock-18 | Неонуар","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgposbaqKAxf0Ob3djFN79eJmo-Chcj4OrzZglRd6dd2j6fCrN_x2Fe2rRJrZW6nJdCdcARvZFuFqAftkO67gJHquZ7LyXpr6SQq-z-DyI0SmLqC","slug":"/weapons/glock-18/neo-noir","rarity":"Covert"},{"name":"M4A4 | Кибербезопасность","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhjxszFJTwW09-vloWZh-L6OITdn2xZ_Pp9i_vG8MKtjVDj-0FlYz2mLI6Rew5oMg6EqVHtyee5h5Xu7Z-YnXRj6HQj5i7YgVXp1qR0cFCZ","slug":"/weapons/m4a4/cyber-security","rarity":"Classified"},{"name":"USP-S | Чудовищная смесь","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpoo6m1FBRp3_bGcjhQ09-jq5WYh8j_IbTamXhu5Mx2gv3--Y3nj1H6rhVlZzj6LYHBIAJvaFHQr1S7k73rgcK47p3Om3Bm7CB04X3dyhC-1AYMMLLxSvuMdg","slug":"/weapons/usp-s/monster-mashup","rarity":"Classified"},{"name":"Five-SeveN | Сказка","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgposLOzLhRlxfbGTj5X09q_goW0hPLiNrXukmJQ-txOhuDG_ZjKhFWmrBZyNmn6dYSTJlA8Yl7V8lDrwey715W878mbm3swvyVzsS3fzhHjgxpFbPsv26JFUuNUhg","slug":"/weapons/five-seven/fairy-tale","rarity":"Classified"},{"name":"AWP | Экзоскелет","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpot621FABz7PLfYQJH9NOln4WHkuP7PYTdn2xZ_Pp9i_vG8MKiigO18xI6ZWqiLNWVdFRrMAuFq1a6yOq-gZft6M6dmHc3v3F0sSvVgVXp1mj51bRN","slug":"/weapons/awp/exoskeleton","rarity":"Restricted"},{"name":"SSG 08 | Параллакс","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpopamie19f0Ob3Yi5FvISJl4iZmPr1J7LSqWdY781lteXA54vwxgLirUZsZTyhcY-RdVQ4aQmGq1Dqwr_p1sTu6MnBwHNl6CAn4SnVm0SpwUYbg4QLWnY","slug":"/weapons/ssg-08/parallax","rarity":"Restricted"},{"name":"UMP-45 | Золотой висмут","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpoo7e1f1Jf1OD3ZDBS09u5mIS0lf7nPq7FnlRd4cJ5ntbN9J7yjRq3-0o6MmyhJICUdVI_MlzY_Fa9xr3m18Puv5Sfznsx73Mh5HnfnkHkn1gSOTwvrMJl","slug":"/weapons/ump-45/gold-bismuth","rarity":"Restricted"},{"name":"Dual Berettas | Катастрофа","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpos7asPwJf1OD3dShD4OOzmImfkuTLN77Ll3hF-sBOhuDG_ZjKhFWmrBZyajv0ddecI1VtNVmF-VDvw-7t15bqvsybz3Q3unN07Svenxa-1E1LOvsv26KRGIX1Dw","slug":"/weapons/dual-berettas/dezastre","rarity":"Restricted"},{"name":"Nova | Прозрачный полимер","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpouLWzKjhjxszGfitD08y5mJmGkuXLP7LWnn9u5MRjjeyP9NigigOxrUVqNWGmIoTAJ1VoY17W8la2yOy6gMW47ZrPwHRl7id042GdwUJscDXiPg","slug":"/weapons/nova/clear-polymer","rarity":"Restricted"},{"name":"Автомат «Галиль» | Вандал","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgposbupIgthwczPYgJF7dC_mL-dlvnwMrfummJW4NFOhujT8om73QXg_xBvN26nJNKUdQ43MwvVq1O7le2-g5TqvZiamiZrvSZx7HfYmgv3308glBa-KA","slug":"/weapons/galil-ar/vandal","rarity":"Mil-Spec"},{"name":"CZ75-Auto | Вендетта","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpotaDyfgZf1OD3cicVueOgkY6PkuPgMoTdn2xZ_Pp9i_vG8MKliwex-UppNmHxcI6UcQdsYFiF8gXvkOy-hJO6tMjMzno17yAj4HvcgVXp1s4D2v3Y","slug":"/weapons/cz75-auto/vendetta","rarity":"Mil-Spec"},{"name":"P90 | Какао-буйство","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpopuP1FA957OORIQJG5dK5q5KKmuf1NL7ummJW4NFOhujT8om72gbn-kRoYT_zIYWSd1I9Yl_QrFToybi91pHq6J6fyiRluCNzs3nVlwv3309SNStznA","slug":"/weapons/p90/cocoa-rampage","rarity":"Mil-Spec"},{"name":"MP5-SD | Condition Zero","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou6rwOANf1OD3fC0X09-5moSCg_77PaHUhGRu5Mx2gv3--Y3nj1H6_xY4YzyhcILDewY3NwmG-AS-yLzq0Je06c7JwSdj6yAr5njclkOxggYMMLJbdMR-kw","slug":"/weapons/mp5-sd/condition-zero","rarity":"Mil-Spec"},{"name":"M249 | Глубокий рельеф","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-jxcjhjxszFI2kb09izkZC0hfL4Or7XqWdY781lteXA54vwxgbm_BJsYmzyLNCRd1VsM16B_lK3ye-6hpDuu5ufz3JksiV07H_VmkepwUYb-wiXbAo","slug":"/weapons/m249/deep-relief","rarity":"Mil-Spec"},{"name":"G3SG1 | Цифровая сетка","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgposem2LFZf1OD3dm5R642JkImYheLkJ4Tdn2xZ_Pp9i_vG8MKm0QewqUY_YjjyIIXEJgFoMlGF-QK6w7_o0Ze778zBz3Iw7yQr5S6PgVXp1pWKJBRH","slug":"/weapons/g3sg1/digital-mesh","rarity":"Mil-Spec"},{"name":"P250 | Загрязнитель","image":"https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpopujwezhjxszYI2gS09W4koWIg8j4OrzZglRd6dd2j6eTptnx0VLlr0M5NTr0ctOSdgE6aVjY_wTtlebogJK87Z3KmHZmvyF2-z-DyPRmpxJ8","slug":"/weapons/p250/contaminant","rarity":"Mil-Spec"}]}],"rare_patterns":null,"texts":{"appearance_history":"M4A1-S | Поток информации (M4A1-S | Printstream) был добавлен в игру 3 декабря 2020 года в составе коллекции «Сломанный клык», вышедшей одновременно с началом одноименной операции. Автором скина является JTPNZ.","description_of_the_pattern":"Глушитель, цевье, ствольная коробка и магазин равномерно окрашены в белый цвет и дополнены многочисленными пиктограммами и надписью XXXY. Остальные части винтовки окрашены в сплошной черный цвет. Дизайн рукояти и приклада дополнен мелкими надписями и пиктограммами. На различных частях оружия присутствуют небольшие акценты в виде перламутровых полос.","effect_of_float":"Float Value скина ограничен значениями от 0.00 до 0.80 что делает M4A1-S | Поток информации доступным во всех состояниях. Незначительные потертости появляются на магазине и глушителе только в состоянии «Закаленное в боях». На максимальных степенях износа весь корпус покрывается слоем патины, благодаря чему скин выглядит заметно темнее.","skin_feature":"M4A1-S | Поток информации относится к скинам «Тайного» качества и существует в версии со счетчиком StatTrak. Скин входит в серию «Поток информации».","skin_popularity":"M4A1-S | Поток информации череп стал популярным сразу после его появления в игре и остается востребованным на сегодняшний день.","pattern_difference":"Паттерн-индекс не влияет на внешний вид скина."},"designer":[],"family":{"name":"Поток информации","slug":"/series/printstream"},"best_stickers_kit_ids":[4685,4691,4694,4692,4693,4546,4611,368,4689,4547]}}},"videoInfo":null},"__N_SSG":true},"page":"/ru/weapons/[weapon]/[skin]","query":{"weapon":"m4a1-s","skin":"printstream"},"buildId":"pYSrMz1jbinvUUJ0hDUhi","runtimeConfig":{"localeSubpaths":{"ru":"ru"},"API_GRAPHQL":"https://wiki.cs.money/graphql"},"nextExport":false,"isFallback":false,"gsp":true,"appGip":true}
eval
у вас выполняемый код?true
иfalse
, а они не соответствуют значениям в питоне, поэтому ast тут не поможет, используйте json