Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iwpnd/likemyso
Like your significant others latest instagram pictures if you forgot it (again)
https://github.com/iwpnd/likemyso
instagram instagram-bot python typer
Last synced: about 2 months ago
JSON representation
Like your significant others latest instagram pictures if you forgot it (again)
- Host: GitHub
- URL: https://github.com/iwpnd/likemyso
- Owner: iwpnd
- License: mit
- Created: 2020-05-16T14:09:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-03T16:40:13.000Z (over 1 year ago)
- Last Synced: 2024-12-08T19:36:11.647Z (about 2 months ago)
- Topics: instagram, instagram-bot, python, typer
- Language: Python
- Homepage:
- Size: 69.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# likemySO
Like your significant others latest instagram pictures if you forgot it (again). Build on [instagram_private_api](https://github.com/ping/instagram_private_api) based on the idea of [Like-My-GF](https://github.com/cyandterry/Like-My-GF).
## Usage
```python
from likemyso import InstaHusband # InstaWifeinstahusband = Instahusband()
instahusband.login(username="your_username", password="your_password")instahusband.like(
significant_other="your_SOs_username",
last_n_pictures=5,
time_sleep_between_calls=20
)
```This will log you into instagram, get the latest items from your SO's instagram feed and like the images that you ""forgot"" to like. Your session will be stored in a settingsfile to [avoid re-logins](https://instagram-private-api.readthedocs.io/en/latest/usage.html#avoiding-re-login) that might flag your instagram account and/or gets you banned.
## Installation
### prerequisitescreate and activate a virtual environment in your working directory:
```bash
virtualenv env
source env/bin/activate
```
### installationclone and install the repository:
```bash
git clone https://github.com/iwpnd/likemyso.git
pip install -e /likemyso
```### testing
```bash
pytest . --cov=likemyso/likemyso -v
```#### optionally:
create a `.env` file in your working directory:
```bash
# .env
INSTAGRAM_USERNAME=your_username
INSTAGRAM_PASSWORD=your_password
INSTAGRAM_SETTINGS_FILE=config.json
INSTAGRAM_USERS_TO_LIKE='["significant_other"]'
INSTAGRAM_LAST_N_PICTURES=5
INSTAGRAM_TIME_SLEEP_BETWEEN_CALLS=20
```## CLI and CronJob
```bash
Usage: likemyso start [OPTIONS]Options:
-u, --username TEXT your instagram username-p, --password TEXT your instagram password
-s, --settings-file TEXT your instagram settings file, if you have
previously logged, defaults to
settings.settings_file-so, --so-username TEXT your significant others username
-ts, --time-sleep INTEGER time sleep between api calls, defaults to
settings.time_sleep_between_calls-lnp, --last-n-pictures INTEGER
last n pictures to like in your SOs
instagram feed, defaults to
settings.last_n_pictures--help Show this message and exit.
```I run this as a service on my raspberry pi in a Docker Swarm Cluster using [swarm-cronjob](https://github.com/crazy-max/swarm-cronjob) to schedule a re-run every now and then.
## Disclaimer
This is not affliated, endorsed or certified by Instagram. This uses is an [independent and unofficial API](https://github.com/ping/instagram_private_api). Strictly not for spam. Use at your own risk.