FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
rocketapi-python/examples.py at main · rocketapi-io/rocketapi-python · GitHub
rocketapi-io
/
rocketapi-python
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
43
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
rocketapi-python
/
examples.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
14 lines (12 loc) · 413 Bytes
Breadcrumbs
rocketapi-python
/
examples.py
Copy path
File metadata and controls
14 lines (12 loc) · 413 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from
rocketapi
import
InstagramAPI
from
rocketapi
.
exceptions
import
NotFoundException
,
BadResponseException
api
=
InstagramAPI
(
token
=
"put your token here"
)
# Get user info by username
username
=
"kanyewest"
try
:
user
=
api
.
get_user_info
(
username
)
print
(
user
)
except
NotFoundException
:
print
(
f"User
{
username
}
not found"
)
except
BadResponseException
:
print
(
f"Can't get
{
username
}
info from API"
)
Back
|
FazBrowse Home
|
New Git URL