{"componentChunkName":"component---src-templates-material-js","path":"/workshops/2021/05/28/pishem-svoego-robota-na-python-urok-6/index.html","result":{"pageContext":{"pageParameters":{"isPreview":false,"isMirror":true,"delay_to_show_donate_popup_seconds":7,"about_page":false,"games_page":true,"games_page_link_in_header":false,"donate_popup_show_ru":true,"donate_popup_title_ru":"Без вас — нас не будет","donate_popup_content_ru":"Помогите нам добывать и рассказывать важные истории. Участие каждого — важно!","donate_popup_show_en":true,"donate_popup_title_en":"We can’t do it alone!","donate_popup_content_en":"Help us uncover and share the stories that matter. Every contribution makes a difference","display_regular_donors_banner":false,"showPatreonMethod":true,"useNewMaterialDonationBanner":true,"new_donations_page_design":true,"donations_popup_variants":{"ru":[{"id":"kc19b","title":"Сохраните журналистику для людей в России ","subtitle":"Читают нас прежде всего люди в России, но будущее «Важных историй» зависит от тех, кто живет за пределами страны. Поддержите нас ежемесячным донатом — сохраните независимую журналистику для ваших близких, которые остаются в России.","is_active":true,"background":"linear-gradient(10deg, #421f20 5%, #994146)"},{"id":"33tc9","title":"У пропаганды есть миллиарды из бюджета. У нас — только вы","subtitle":"Перемены возможны, если независимые от власти журналисты продолжают свою работу день за днем, год за годом. Мы рассказываем важные истории уже шесть лет. Помогите нам продолжать.","is_active":true,"background":"linear-gradient(10deg, #421f20 5%, #994146)"}],"en":[{"id":"nj1py","title":"Important stories don’t tell themselves","subtitle":"Independent journalism comes at a cost. We answer to no owners or advertisers — only to you, our readers.  Your ongoing support allows us to keep exposing the truth. Without you, we won’t be here.","is_active":true,"background":"linear-gradient(10deg, #421f20 5%, #994146)"},{"id":"xdfc1","title":"Help us outlast the Kremlin censorship","subtitle":"Censorship lose to journalism that keeps showing up, year after year. Monthly donors are what make that possible","is_active":true,"background":"linear-gradient(10deg, #421f20 5%, #994146)"},{"id":"ck121","title":"State propaganda has billions to spend. We have only you to rely on","subtitle":"Change happens when independent journalists keep showing up — day after day, year after year. Six years in, we're still showing up. Help us keep going with a monthly donation.","is_active":true,"background":"linear-gradient(10deg, #421f20 5%, #994146)"}]},"feedback_page":true,"donorsCount":0,"showAuthorsRequestAfterMaterial":true,"radioPage":true,"radioExists":{"ru":true,"en":false},"singlePlaylistPath":{"ru":"/radio/2025/12/22/razgovori-ovazhnikh/index.html"},"with_bookmarks":true,"news_feed":true,"news_feed_skeleton":false,"news_page_redesign":true,"with_topics":true,"materials_topics":false,"topics_page":true,"with_pdf_share":false,"with_native_share":false,"preferred_source_page":true,"charon_new_form":true,"preferred_source_promos":true,"charon_en_page":true},"pk":269,"header":"Пишем своего робота на Python. Урок 6","lead":"Получаем контракты за конкретный промежуток времени с помощью библиотеки datetime","category":"workshops","entry_image":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-1920x960px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-1920x960px_2x.webp","for_width":1920,"for_height":960,"real_width_1x":1920,"real_width_2x":3840,"real_height_1x":960,"real_height_2x":1920},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-1920x960px_1x.png","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-1920x960px_2x.png","for_width":1920,"for_height":960,"real_width_1x":1920,"real_width_2x":3840,"real_height_1x":960,"real_height_2x":1920},{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-1272x636px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-1272x636px_2x.webp","for_width":1272,"for_height":636,"real_width_1x":1272,"real_width_2x":2544,"real_height_1x":636,"real_height_2x":1272},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-1272x636px_1x.png","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-1272x636px_2x.png","for_width":1272,"for_height":636,"real_width_1x":1272,"real_width_2x":2544,"real_height_1x":636,"real_height_2x":1272},{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-912x456px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-912x456px_2x.webp","for_width":912,"for_height":456,"real_width_1x":912,"real_width_2x":1824,"real_height_1x":456,"real_height_2x":912},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-912x456px_1x.png","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-912x456px_2x.png","for_width":912,"for_height":456,"real_width_1x":912,"real_width_2x":1824,"real_height_1x":456,"real_height_2x":912},{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-600x400px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-600x400px_2x.webp","for_width":600,"for_height":400,"real_width_1x":600,"real_width_2x":1200,"real_height_1x":400,"real_height_2x":800},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-600x400px_1x.png","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-600x400px_2x.png","for_width":600,"for_height":400,"real_width_1x":600,"real_width_2x":1200,"real_height_1x":400,"real_height_2x":800},{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-360x360px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-360x360px_2x.webp","for_width":360,"for_height":360,"real_width_1x":360,"real_width_2x":720,"real_height_1x":360,"real_height_2x":720},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-360x360px_1x.png","url_2x":"https://static.istories.media/uploaded/images/9d8f05816dd94912b4880523c8610f83-360x360px_2x.png","for_width":360,"for_height":360,"real_width_1x":360,"real_width_2x":720,"real_height_1x":360,"real_height_2x":720}],"entry_image_credit":"","blocks":[{"data":"Продолжаем писать робота, который собирает интересующие нас госконтракты и отправляет их на почту. Сегодня мы поговорим о важной библиотеке <strong>datetime</strong>. По ее названию понятно, что она предназначена для работы с временем и датами.&nbsp;","type":"p","className":""},{"data":{"id":2463,"data":{"url":"https://www.youtube.com/embed/mcs57WnCF84","text":"Видео: Глеб Лиманский","provider":"youtube","rawInput":"https://www.youtube.com/watch?v=mcs57WnCF84&t=8s","ratio_mobile":"16:9","ratio_desktop":"16:9"},"category":"video-embed"},"type":"video-embed"},{"data":"Она пригодится нам, чтобы мы могли передавать в нашу функцию такой аргумент как <strong>daterange</strong>. С его помощью мы сможем выделять определенный промежуток времени, за который хотим получить контракты. Сегодня напишем функцию, которая будет возвращать нам промежуток в виде недели — либо автоматически от сегодняшнего числа, либо от того, которое вам необходимо.","type":"p","className":""},{"data":"Для начала импортируем библиотеку <strong>datetime</strong>, введя <strong>from datetime import timedelta, date</strong> и на время закомментируем нашу функцию с помощью <strong>\"\"\"</strong>.","type":"p","className":""},{"data":{"id":2420,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/64da19e4dcd74496b389a05e9357c6a5-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/64da19e4dcd74496b389a05e9357c6a5-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":738,"real_height_2x":1477},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/64da19e4dcd74496b389a05e9357c6a5-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/64da19e4dcd74496b389a05e9357c6a5-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":738,"real_height_2x":1477}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Назовем новую функцию <strong>get_week</strong>. Это будет функция с необязательным аргументом: если мы хотим выбрать конкретную дату и отсчитать от нее неделю назад, мы можем вписать дату; если же просто хотим получить отсчет на неделю назад от сегодняшнего числа, дату писать не нужно. Для этого укажем необязательный аргумент <strong>day</strong>, который по умолчанию будет <strong>None</strong>.","type":"p","className":""},{"data":{"id":2421,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/4a18598b09e646aba5a44813c8ef9c55-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/4a18598b09e646aba5a44813c8ef9c55-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":819,"real_height_2x":1638},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/4a18598b09e646aba5a44813c8ef9c55-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/4a18598b09e646aba5a44813c8ef9c55-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":819,"real_height_2x":1638}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Дальше пропишем условие, чтобы разобраться с датой отсчета — мы хотим получить сегодняшнее число автоматически, если <strong>day</strong> будет равен <strong>None</strong>. Поэтому <strong>start_date</strong> зададим как раз с помощью библиотеки <strong>datetime</strong>.","type":"p","className":""},{"data":"Чтобы мы могли указать какую-то дату на входе нашей функции, нам нужно перевести ее в формат библиотеки <strong>datetime</strong>, то есть, сделать дату объектом библиотеки. Для этого используем функцию <strong>strptime</strong>, которая на вход получает число, распознает его формат и делает его понятным для библиотеки. В нашем случае формат будет ДД.ММ.ГГ.","type":"p","className":""},{"data":{"id":2422,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/89c36ae246c843d29f0a95f7fd12eaec-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/89c36ae246c843d29f0a95f7fd12eaec-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":274,"real_height_2x":549},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/89c36ae246c843d29f0a95f7fd12eaec-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/89c36ae246c843d29f0a95f7fd12eaec-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":274,"real_height_2x":549}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Теперь, когда у нас есть точка отсчета, нам нужно отсчитать от нее ровно неделю. Для этого применим функцию <strong>timedelta</strong>. Создаем переменную <strong>end_date</strong> и вычитаем из <strong>start_date</strong> неделю, указывая промежуток <strong>weeks=1</strong> в функции <strong>timedelta</strong>. Могут быть указаны и минуты, и годы, если это необходимо для какой-то задачи.","type":"p","className":""},{"data":{"id":2423,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/a55246472ab842738b32b16a00d7dab8-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/a55246472ab842738b32b16a00d7dab8-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":463,"real_height_2x":926},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/a55246472ab842738b32b16a00d7dab8-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/a55246472ab842738b32b16a00d7dab8-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":463,"real_height_2x":926}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Мы получили конечную дату и можем посмотреть в <a href=\"https://github.com/clearspending/clearspending-examples/wiki\" data-type=\"usual\" target=\"_blank\">документации</a> к API «ГосЗатрат», как должна выглядеть строчка с датами, которую мы должны передать нашей главной функции (той, что мы закомментировали в начале урока).&nbsp;","type":"p","className":""},{"data":{"id":2424,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/c7e8ea39d66446d383dcad807eb573d6-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/c7e8ea39d66446d383dcad807eb573d6-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":576,"real_height_2x":1152},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/c7e8ea39d66446d383dcad807eb573d6-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/c7e8ea39d66446d383dcad807eb573d6-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":576,"real_height_2x":1152}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Сделаем по образцу. Назовем переменную <strong>date_range</strong> и воспользуемся <a href=\"https://istories.media/workshops/2020/11/18/vvedenie-v-python-chast-3/\" data-type=\"usual\" target=\"_blank\">методом f-строк</a>, чтобы поместить внутрь фигурных скобок любые параметры, которые нам нужны. Сегодня это будут <strong>start_date</strong> и <strong>end_date</strong>, разделенные дефисом.&nbsp;","type":"p","className":""},{"data":"Запустим <strong>get_week</strong> и посмотрим, что она вернет нам. В примере не будем указывать число — то есть, отсчет будет от дня записи этого урока.","type":"p","className":""},{"data":{"id":2425,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/ac35735971324dc5939959ca7e448551-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/ac35735971324dc5939959ca7e448551-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":555,"real_height_2x":1110},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/ac35735971324dc5939959ca7e448551-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/ac35735971324dc5939959ca7e448551-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":555,"real_height_2x":1110}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Как видите, даты нам вернулись, но не в том формате, который просит API «ГосЗатрат» — нужно поменять местами дни, месяцы и годы. Для этого воспользуемся еще одной функцией библиотеки <strong>datetime</strong> —&nbsp;<strong>strftime</strong> —&nbsp;и добавим нужный формат в <strong>f</strong>-строку. Попробуем запустить функцию еще раз.","type":"p","className":""},{"data":{"id":2426,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/f61474cb5b7a4008893ff7312b67df4c-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/f61474cb5b7a4008893ff7312b67df4c-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":564,"real_height_2x":1130},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/f61474cb5b7a4008893ff7312b67df4c-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/f61474cb5b7a4008893ff7312b67df4c-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":564,"real_height_2x":1130}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Получилось, наша функция вернула даты в нужном формате. Теперь можем раскомментировать нашу основную функцию <strong>get_contracts_by_region</strong>. Пора бы ее переименовать в просто <strong>get_contracts</strong>, ведь мы уже знаем, что можем получать контракты по любым поисковым параметрам. Перенесем сегодняшнюю функцию <strong>get_week</strong> наверх и продолжим.","type":"p","className":""},{"data":{"id":2427,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/22c965de127144b8be04d0ff077bd96d-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/22c965de127144b8be04d0ff077bd96d-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":502,"real_height_2x":1003},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/22c965de127144b8be04d0ff077bd96d-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/22c965de127144b8be04d0ff077bd96d-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":502,"real_height_2x":1003}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Вместо <strong>supplierinn</strong> в запросе <strong>get_contracts</strong> укажем <strong>date_range</strong> и добавим значение из функции <strong>get_week</strong>. И поменяем еще кое-что — поскольку мы отсчитываем неделю назад, в <strong>f</strong>-строке функции <strong>get_week</strong> нужно поменять местами <strong>start_date</strong> и <strong>end_date</strong>.&nbsp;","type":"p","className":""},{"data":{"id":2428,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/3bc9e0e56fc947edba313f6d3f9fbfb1-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/3bc9e0e56fc947edba313f6d3f9fbfb1-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":398,"real_height_2x":797},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/3bc9e0e56fc947edba313f6d3f9fbfb1-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/3bc9e0e56fc947edba313f6d3f9fbfb1-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":398,"real_height_2x":797}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Пора проверить, как отработает наша функция. Передадим в функцию <strong>get_contracts</strong> временной промежуток в виде недели от дня записи урока и увидим в терминале, что параметр signDate вписывается в указанный нами временной промежуток.","type":"p","className":""},{"data":{"id":2429,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/b6ca3535045442faacf9a58738387617-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/b6ca3535045442faacf9a58738387617-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":536,"real_height_2x":1072},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/b6ca3535045442faacf9a58738387617-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/b6ca3535045442faacf9a58738387617-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":536,"real_height_2x":1072}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"И напоследок узнаем, как отработает функция, если указать ей конкретную дату, от которой нужно отсчитать неделю — пусть это будет 1 мая 2021 года. Если вы все сделали по инструкции, то параметр signDate впишется в неделю до 1 мая.","type":"p","className":""},{"data":{"id":2430,"data":{"images":[{"imagesList":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/9d77552d4c364815aef277c3e08d5557-1200xautopx_1x.webp","url_2x":"https://static.istories.media/uploaded/images/9d77552d4c364815aef277c3e08d5557-1200xautopx_2x.webp","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":537,"real_height_2x":1074},{"format":"png","url_1x":"https://static.istories.media/uploaded/images/9d77552d4c364815aef277c3e08d5557-1200xautopx_1x.png","url_2x":"https://static.istories.media/uploaded/images/9d77552d4c364815aef277c3e08d5557-1200xautopx_2x.png","for_width":1200,"for_height":"auto","real_width_1x":1200,"real_width_2x":2400,"real_height_1x":537,"real_height_2x":1074}]}]},"category":"image-embed"},"type":"image-embed"},{"data":"Сегодня мы научились брать даты в виде строчки, делать их объектом библиотеки, отсчитывать временные шаги вперед или назад и использовать эти знания для нашего будущего робота (представляете, мы уже почти дописали его!). Как всегда, ждем ваши вопросы в нашем <a href=\"https://t.me/istories_helloworld\" data-type=\"usual\" target=\"_blank\">чате</a> в Telegram.","type":"p","className":""}],"created_at_date":"2021-05-28","updated_at_date":null,"created_at_date_time":null,"updated_at_date_time":null,"is_exclusive":false,"is_urgent":false,"initially_published_at":"2021-05-28T11:42:03.821Z","has_additional_facts":false,"locale":"ru","has_visualization_without_fallback":false,"spec_project":null,"header_secondary":"","warning":"","is_translated_by_ai":false,"with_donation_banner":true,"donation_banner_header":"","donation_banner_text":"","media_outlet__codename":null,"with_authors_request_banner":false,"faq":[],"_path":"/workshops/2021/05/28/pishem-svoego-robota-na-python-urok-6/","is_published":true,"authors_list":[{"id":8,"lead":"Главная редакторка «Важных историй»","_path":"alesya-marokhovskaya","avatar":[{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-896x504px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-896x504px_2x.webp","for_width":896,"for_height":504,"original_url":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-original.jpg","real_width_1x":896,"real_width_2x":1792,"real_height_1x":504,"real_height_2x":1008},{"format":"jpg","url_1x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-896x504px_1x.jpg","url_2x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-896x504px_2x.jpg","for_width":896,"for_height":504,"original_url":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-original.jpg","real_width_1x":896,"real_width_2x":1792,"real_height_1x":504,"real_height_2x":1008},{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-688x387px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-688x387px_2x.webp","for_width":688,"for_height":387,"original_url":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-original.jpg","real_width_1x":688,"real_width_2x":1376,"real_height_1x":387,"real_height_2x":774},{"format":"jpg","url_1x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-688x387px_1x.jpg","url_2x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-688x387px_2x.jpg","for_width":688,"for_height":387,"original_url":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-original.jpg","real_width_1x":688,"real_width_2x":1376,"real_height_1x":387,"real_height_2x":774},{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-416x234px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-416x234px_2x.webp","for_width":416,"for_height":234,"original_url":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-original.jpg","real_width_1x":416,"real_width_2x":832,"real_height_1x":234,"real_height_2x":468},{"format":"jpg","url_1x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-416x234px_1x.jpg","url_2x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-416x234px_2x.jpg","for_width":416,"for_height":234,"original_url":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-original.jpg","real_width_1x":416,"real_width_2x":832,"real_height_1x":234,"real_height_2x":468},{"format":"webp","url_1x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-336x189px_1x.webp","url_2x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-336x189px_2x.webp","for_width":336,"for_height":189,"original_url":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-original.jpg","real_width_1x":336,"real_width_2x":672,"real_height_1x":188,"real_height_2x":378},{"format":"jpg","url_1x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-336x189px_1x.jpg","url_2x":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-336x189px_2x.jpg","for_width":336,"for_height":189,"original_url":"https://static.istories.media/uploaded/images/12285015ded6416c9ce475e3a939d7f7-original.jpg","real_width_1x":336,"real_width_2x":672,"real_height_1x":188,"real_height_2x":378}],"lead_en":"Editor-in-chief","ordering":null,"position":"Редакторка","is_public":true,"last_name":"Мароховская","first_name":"Алеся","position_en":"Editor","last_name_en":"Marokhovskaya","first_name_en":"Alesya"}],"external_authors_list":[],"editors_list":[],"external_editors_list":[],"participants_list":[],"external_participants_list":[],"partners_list":[],"case":null,"translated_material":null,"audio_material":null,"text_material":null,"id":269,"topics":[],"meta":{"og_title":"","og_description":"","twitter_title":"","twitter_description":"","og_image":"https://static.istories.media/uploaded/images/share/3d333ed5248641bc8f84062b6622a922.png","twitter_image":"https://static.istories.media/uploaded/images/share/3d333ed5248641bc8f84062b6622a922.png","vk_image":"https://static.istories.media/uploaded/images/share/vk/01f7325d20e44d2da8624216625b45a0.png"},"tags":["python","ddj"],"playlist":null,"socialMediaBanners":[{"id":10,"text":"У пропаганды есть миллиарды из бюджета. У нас — только вы","link":"","codename":"donation"},{"id":14,"text":"Список погибших и пропавших без вести российских военных","link":"","codename":"haron"},{"id":18,"text":"","link":"","codename":"mobile_app"},{"id":6,"text":"Оставайтесь на связи: подпишитесь на нашу рассылку","link":"","codename":"newsletter"}]}},"staticQueryHashes":["764694655"],"slicesMap":{}}