Getting biography field information. #87
Replies: 3 comments 7 replies
-
seems like instagram has updated the biography api. i'll check what's happening. |
Beta Was this translation helpful? Give feedback.
-
The biography is looking "normal", just one string with "\n". {
"data": {
"user": {
"ai_agent_type": null,
"biography": "Prof. @unimaroficial | Mestre em Ciência da Computação - UFScar\n💻 Computação do básico ao avançado\n🤖 Transformando conceitos simples em magia com IA",
"bio_links": [],
"fb_profile_biolink": null,
"biography_with_entities": {
"raw_text": "Prof. @unimaroficial | Mestre em Ciência da Computação - UFScar\n💻 Computação do básico ao avançado\n🤖 Transformando conceitos simples em magia com IA",
"entities": [
{
"user": {
"username": "unimaroficial"
},
"hashtag": null
}
]
},
... |
Beta Was this translation helpful? Give feedback.
-
Hello, $username = "mustafabukulmezcom";
$python = 'C:\\Users\\Mustafa\\AppData\\Local\\Programs\\Python\\Python310\\python.exe';
$pyscript = "C:\\xampp\\htdocs\\libraries\\py\\insta_read.py " . $username ;
exec("$python $pyscript", $output, $return);
var_dump($output); First of all, my Python codes were like this. from ensta import Host
host = Host(username, password)
profile = host.profile("instagramusername")
print(profile.biography)
print(profile.biography_links)
print(profile.category_name)
print(profile.following_count) When I use it this way, the output I get on the PHP side is like this. Index 2,3,4 all my biography @mustafabukulmezcom
I started this discussion because of the problem so far. However, when I tried more, I realized that I could not get any information from some profiles. Ex: @design
I realized something was wrong here. Afterwards, I edited Python codes. #!/usr/bin/env python
# to pass parameters to this file
import sys
# read parameter
who = sys.argv[1]
from ensta import Host
host = Host("username", 'password')
profile = host.profile(who)
# Organize data into an associative array
data = {
"Username": who,
"Biography": profile.biography,
"Biography Links": profile.biography_links,
"Category Name": profile.category_name,
"Following Count": profile.following_count,
"Followed by Viewer": profile.followed_by_viewer,
"Follower Count": profile.follower_count,
"Full Name": profile.full_name,
......
}
# Convert data to JSON format
import json
json_data = json.dumps(data)
# Print JSON data
print(json_data) Now I can get information from their profiles, which I just noticed was missing information. @design
However, the problem that caused this discussion was not seen in this way. Here; @mustafabukulmezcom
I gave all this information so maybe it will make it easier for you to find out what's wrong. Perhaps it will become clear that trying further is unnecessary. |
Beta Was this translation helpful? Give feedback.
-
I encountered a problem like this.
If the biography is written under each other with enter key, for example:
Then result is like this;
[1]=> string(7) "bla bla" [2]=> string(7) "bla bla" [3]=> string(7) "bla bla"
However, if I write my biography information without enter;
then result is;
[1]=> string(23) "bla bla bla bla bla bla"
My question is this;
How can we get all the biography information at once? Is there a way around this?
I using like this.
Beta Was this translation helpful? Give feedback.
All reactions