-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.py
37 lines (30 loc) · 839 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import datetime
from selenium import webdriver
import time
from InstagramAPI import InstagramAPI
from write_image import *
import numpy as np
import cv2
import textwrap
import random
import praw
import csv
#Mir sucks at importing guys
#https://www.instagram.com/todayilearnedbot/
dt=datetime.datetime.today()
print(dt.weekday())
#monday=0,wednesday=2,friday=4
while(True):
count = 0
nw=datetime.datetime.now()
print("test")
while(nw.hour == 10 and nw.minute == 5):
print("test-2")
if(count<1):
callscraper()
InstagramAPI = InstagramAPI("usrnm", "pswd")
InstagramAPI.login() # login
photo_path = 'post.jpg'
caption = "Beep-Bop, I'm a bot. \n "
InstagramAPI.uploadPhoto(photo_path, caption=caption)
count = count + 1