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 unexpected response from "link" with data: <!DOCTYPE html> #26

Closed Larssonz123 closed 5 years ago

Larssonz123 commented 5 years ago

Был бот, который работал на ура в течении 2-3 месяцев,

Сейчас, при попытке получить лайки и комментарии, выходит куча HTML кода по типу

Get unexpected response from 'https://www.instagram.com/p/GZrCI/' 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 @nick111 • Jun 26, 2011 at 3:10am UTC
</title>

Делаю так

photo = Media(photo_id)
AGENT.update(photo)
likes = photo.likes_count
comments = photo.comments_count

В чем может быть ошибка?

OlegYurchik commented 5 years ago

Здравствуйте! Извините за долгое ожидание. К сожалению, не смог воспроизвести проблему. Попробовал вот такой код: `from instaparser.agents import Agent from instaparser.entities import Media

agent = Agent() photo = Media("GZrCI") agent.update(photo) likes = photo.likes_count comments = photo.comments_count print(likes) print(comments)`

Ошибки не произошло. У вас ошибка появляется до сих пор?

Larssonz124 commented 5 years ago

Забыл пароль от того аккаунта, но проблему можно закрывать. Видимо инстаграм заблокировал или ограничил мой аккаунт, потому что с другими аккаунтами все работает

OlegYurchik commented 5 years ago

Похоже на то. Попробуйте с анонимным аккаунтом