/Tweet2Insta

任意ユーザの特定キーワード+画像付きtweetをInstagramで投稿します

Primary LanguagePython

Tweet2Insta

Collect tweets of specified user, and post Instagram This one doesn't require Twitter APIs, but needs Instagram API below: https://www.instagram.com/developer/

Requirements

You have to create your own config.py. See requirements.txt or just $ pip install -r requirements.txt

and $ pip install twitterscraper

Usage

  1. Create MySQLDB
mysql>
USE mysql;
ALTER USER 'root'@'localhost' identified BY 'root';
flush privileges;
create database tweet2insta;
use tweet2insta;
create table tweets (id bigint not null primary key, datetime datetime, text text, img_path varchar(255));
alter table tweets default character set utf8mb4;
alter table tweets modify text varchar(255) character set utf8mb4;
  1. Make dir $ mkdir img

  2. Scrape tweets via twitterscraper $ python twitterscraping.py

  3. Store data into DB, and post Instagram $ python Tweet2Insta.py

  4. Use cron for update posts with cronTwitter2Insta.py

References