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

get_likes и get_cursor перестали работать #40

Closed postmalone12 closed 5 years ago

postmalone12 commented 5 years ago
photo_id = "Bvb2SK7FIv-"
media = Media(photo_id)
likes = AGENT.get_comments(media, count=100)

Добрый день, извиняюсь если создаю еще одну запись, но очень уж нравится библиотека, но в последнее время появились проблемы. С недавнего дня появилась вот такая ошибка при использовании get_likes и get_comments и авторизированного агента. Программа падает при вызывании этих методов, другие вроде как ошибки не выдают. Весь лог ошибки тут не поместится, но вот краткий

 File "/...../lib/python3.7/site-packages/instaparser/agents.py", line 54, in update
    obj._set_data(data)
  File "........./lib/python3.7/site-packages/instaparser/entities.py", line 140, in _set_data
    self.comments_count = data["edge_media_to_comment"]["count"]
KeyError: 'edge_media_to_comment'
...
   raise UnexpectedResponse(response.url, response.text)
instaparser.exceptions.UnexpectedResponse: Get unexpected response from 'https://www.instagram.com/p/BLXF4Xsg0Rc/' with data: <!DOCTYPE html>
<html lang="en" class="no-js logged-in client-root">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <title>
Instagram post by Beverly • Oct 9, 2016 at 11:35pm UTC
</title>

        <meta name="robots" content="noimageindex, noarchive">
        <meta name="mobile-web-app-capable" content="yes">
OlegYurchik commented 5 years ago

Пофикшено. Проблемы c get_likes не увидел, у меня все тесты с ним проходили изначально