OlegYurchik / pyInstagram

This is a simple and easy-to-use library for interacting with the Instagram. The library works through the web interface of the Instagram and does not depend on the official API
MIT License
232 stars 49 forks source link

Ошибка при парсинге caption #2

Closed lotarbo closed 6 years ago

lotarbo commented 6 years ago

В этой строчке не проверяется что массив может быть пуст) https://github.com/OlegYurchik/InstagramLib/blob/master/instagram.py#L199 Этот пост например https://www.instagram.com/p/BNUu1rDDcDb/ { 'node': { 'id': '1392944183258235099', '__typename': 'GraphImage', 'edge_media_to_caption': { 'edges': [] }, 'shortcode': 'BNUu1rDDcDb', 'edge_media_to_comment': { 'count': 61 }, 'comments_disabled': False, 'taken_at_timestamp': 1480271908, 'dimensions': { 'height': 484, 'width': 750 }, 'display_url': 'https://instagram.fhrk1-1.fna.fbcdn.net/t51.2885-15/e35/15048226_1835700863340607_8068554841057656832_n.jpg', 'edge_media_preview_like': { 'count': 12459 }, 'owner': { 'id': '12411530' }, 'thumbnail_src': 'https://instagram.fhrk1-1.fna.fbcdn.net/t51.2885-15/e35/c133.0.484.484/15048226_1835700863340607_8068554841057656832_n.jpg', 'thumbnail_resources': [], 'is_video': False } }

OlegYurchik commented 6 years ago

Понял, исправлю в следующем коммите