%global _empty_manifest_terminate_build 0
Name: python-instapi
Version: 0.1.4
Release: 1
Summary: A client interface for the private Instagram API.
License: MIT
URL: https://github.com/breuerfelix/instapi
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/55/10/df6b819c40c0e09ae69ad6e329ae622e2576d57df2475680eab176cc2730/instapi-0.1.4.tar.gz
BuildArch: noarch
%description
Instagram Private API
A Python wrapper for the Instagram private API with no 3rd party dependencies.
## Overview
I wrote this to access Instagram's API when they clamped down on developer access. Because this is meant to achieve [parity](COMPAT.md) with the [official public API](https://www.instagram.com/developer/endpoints/), methods not available in the public API will generally have lower priority.
Problems? Please check the [docs](https://instapi.readthedocs.io/en/latest/) before submitting an issue.
## Features
- Supports many functions that are only available through the official app, such as:
- Multiple feeds, such as [user feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.user_feed), [location feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_location), [tag feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_tag), [popular feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_popular)
- Post a [photo](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_photo) or [video](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_video) to your feed or stories
- [Like](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_like)/[unlike](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.delete_like) posts
- Get [post comments](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.media_comments)
- [Post](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_comment)/[delete](https://instapi.readthedocs.io/en/latest/api.html#instagram_web_api.Client.delete_comment) comments
https://instapi.readthedocs.io/en/latest/api/#instapi.Client.comment_unlike
- [Like](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.comment_like)/[unlike](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.comment_unlike) comments
- [Follow](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.friendships_create)/[unfollow](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.friendships_destroy) users
- User [stories](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.user_story_feed)
- And [more](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client)!
- Compatible with functions available through the public API using the [ClientCompatPatch](https://instapi.readthedocs.io/en/latest/api.html#instapi.ClientCompatPatch) utility class
## Documentation
Documentation is available at [instapi.rtfd.io](https://instapi.readthedocs.io/en/latest/).
## Install
Install with pip:
``pip install instapi``
To update:
``pip install instapi --upgrade``
To update with latest repo code:
``pip install instapi --upgrade --force-reinstall``
Tested on Python 3.
## Usage
The [app API client](instapi/) emulates the official app and has a larger set of functions.
The [``examples/``](examples/) and [``tests/``](tests/) are a good source of detailed sample code on how to use the clients, including a simple way to save the auth cookie for reuse.
### Use the [official app's API](instapi/)
```python
from instapi import Client, ClientCompatPatch
user_name = 'YOUR_LOGIN_USER_NAME'
password = 'YOUR_PASSWORD'
api = Client(user_name, password)
results = api.feed_timeline()
items = [item for item in results.get('feed_items', [])
if item.get('media_or_ad')]
for item in items:
# Manually patch the entity to match the public api as closely as possible, optional
# To automatically patch entities, initialise the Client with auto_patch=True
ClientCompatPatch.media(item['media_or_ad'])
print(item['media_or_ad']['code'])
```
### Avoiding Re-login
You are advised to persist/cache the auth cookie details to avoid logging in every time you make an api call. Excessive logins is a surefire way to get your account flagged for removal. It's also advisable to cache the client details such as user agent, etc together with the auth details.
The saved auth cookie can be reused for up to **90 days**.
## Support
Make sure to review the [contributing documentation](CONTRIBUTING.md) before submitting an issue report or pull request.
## Legal
Disclaimer: This is not affliated, endorsed or certified by Instagram. This is an independent and unofficial API. Strictly **not for spam**. Use at your own risk.
%package -n python3-instapi
Summary: A client interface for the private Instagram API.
Provides: python-instapi
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-instapi
Instagram Private API
A Python wrapper for the Instagram private API with no 3rd party dependencies.
## Overview
I wrote this to access Instagram's API when they clamped down on developer access. Because this is meant to achieve [parity](COMPAT.md) with the [official public API](https://www.instagram.com/developer/endpoints/), methods not available in the public API will generally have lower priority.
Problems? Please check the [docs](https://instapi.readthedocs.io/en/latest/) before submitting an issue.
## Features
- Supports many functions that are only available through the official app, such as:
- Multiple feeds, such as [user feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.user_feed), [location feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_location), [tag feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_tag), [popular feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_popular)
- Post a [photo](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_photo) or [video](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_video) to your feed or stories
- [Like](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_like)/[unlike](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.delete_like) posts
- Get [post comments](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.media_comments)
- [Post](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_comment)/[delete](https://instapi.readthedocs.io/en/latest/api.html#instagram_web_api.Client.delete_comment) comments
https://instapi.readthedocs.io/en/latest/api/#instapi.Client.comment_unlike
- [Like](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.comment_like)/[unlike](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.comment_unlike) comments
- [Follow](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.friendships_create)/[unfollow](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.friendships_destroy) users
- User [stories](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.user_story_feed)
- And [more](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client)!
- Compatible with functions available through the public API using the [ClientCompatPatch](https://instapi.readthedocs.io/en/latest/api.html#instapi.ClientCompatPatch) utility class
## Documentation
Documentation is available at [instapi.rtfd.io](https://instapi.readthedocs.io/en/latest/).
## Install
Install with pip:
``pip install instapi``
To update:
``pip install instapi --upgrade``
To update with latest repo code:
``pip install instapi --upgrade --force-reinstall``
Tested on Python 3.
## Usage
The [app API client](instapi/) emulates the official app and has a larger set of functions.
The [``examples/``](examples/) and [``tests/``](tests/) are a good source of detailed sample code on how to use the clients, including a simple way to save the auth cookie for reuse.
### Use the [official app's API](instapi/)
```python
from instapi import Client, ClientCompatPatch
user_name = 'YOUR_LOGIN_USER_NAME'
password = 'YOUR_PASSWORD'
api = Client(user_name, password)
results = api.feed_timeline()
items = [item for item in results.get('feed_items', [])
if item.get('media_or_ad')]
for item in items:
# Manually patch the entity to match the public api as closely as possible, optional
# To automatically patch entities, initialise the Client with auto_patch=True
ClientCompatPatch.media(item['media_or_ad'])
print(item['media_or_ad']['code'])
```
### Avoiding Re-login
You are advised to persist/cache the auth cookie details to avoid logging in every time you make an api call. Excessive logins is a surefire way to get your account flagged for removal. It's also advisable to cache the client details such as user agent, etc together with the auth details.
The saved auth cookie can be reused for up to **90 days**.
## Support
Make sure to review the [contributing documentation](CONTRIBUTING.md) before submitting an issue report or pull request.
## Legal
Disclaimer: This is not affliated, endorsed or certified by Instagram. This is an independent and unofficial API. Strictly **not for spam**. Use at your own risk.
%package help
Summary: Development documents and examples for instapi
Provides: python3-instapi-doc
%description help
Instagram Private API
A Python wrapper for the Instagram private API with no 3rd party dependencies.
## Overview
I wrote this to access Instagram's API when they clamped down on developer access. Because this is meant to achieve [parity](COMPAT.md) with the [official public API](https://www.instagram.com/developer/endpoints/), methods not available in the public API will generally have lower priority.
Problems? Please check the [docs](https://instapi.readthedocs.io/en/latest/) before submitting an issue.
## Features
- Supports many functions that are only available through the official app, such as:
- Multiple feeds, such as [user feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.user_feed), [location feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_location), [tag feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_tag), [popular feed](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.feed_popular)
- Post a [photo](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_photo) or [video](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_video) to your feed or stories
- [Like](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_like)/[unlike](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.delete_like) posts
- Get [post comments](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.media_comments)
- [Post](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.post_comment)/[delete](https://instapi.readthedocs.io/en/latest/api.html#instagram_web_api.Client.delete_comment) comments
https://instapi.readthedocs.io/en/latest/api/#instapi.Client.comment_unlike
- [Like](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.comment_like)/[unlike](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.comment_unlike) comments
- [Follow](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.friendships_create)/[unfollow](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.friendships_destroy) users
- User [stories](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client.user_story_feed)
- And [more](https://instapi.readthedocs.io/en/latest/api.html#instapi.Client)!
- Compatible with functions available through the public API using the [ClientCompatPatch](https://instapi.readthedocs.io/en/latest/api.html#instapi.ClientCompatPatch) utility class
## Documentation
Documentation is available at [instapi.rtfd.io](https://instapi.readthedocs.io/en/latest/).
## Install
Install with pip:
``pip install instapi``
To update:
``pip install instapi --upgrade``
To update with latest repo code:
``pip install instapi --upgrade --force-reinstall``
Tested on Python 3.
## Usage
The [app API client](instapi/) emulates the official app and has a larger set of functions.
The [``examples/``](examples/) and [``tests/``](tests/) are a good source of detailed sample code on how to use the clients, including a simple way to save the auth cookie for reuse.
### Use the [official app's API](instapi/)
```python
from instapi import Client, ClientCompatPatch
user_name = 'YOUR_LOGIN_USER_NAME'
password = 'YOUR_PASSWORD'
api = Client(user_name, password)
results = api.feed_timeline()
items = [item for item in results.get('feed_items', [])
if item.get('media_or_ad')]
for item in items:
# Manually patch the entity to match the public api as closely as possible, optional
# To automatically patch entities, initialise the Client with auto_patch=True
ClientCompatPatch.media(item['media_or_ad'])
print(item['media_or_ad']['code'])
```
### Avoiding Re-login
You are advised to persist/cache the auth cookie details to avoid logging in every time you make an api call. Excessive logins is a surefire way to get your account flagged for removal. It's also advisable to cache the client details such as user agent, etc together with the auth details.
The saved auth cookie can be reused for up to **90 days**.
## Support
Make sure to review the [contributing documentation](CONTRIBUTING.md) before submitting an issue report or pull request.
## Legal
Disclaimer: This is not affliated, endorsed or certified by Instagram. This is an independent and unofficial API. Strictly **not for spam**. Use at your own risk.
%prep
%autosetup -n instapi-0.1.4
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-instapi -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue May 30 2023 Python_Bot - 0.1.4-1
- Package Spec generated