-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.py
75 lines (65 loc) · 1.94 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import datetime, time
from post import prep_post, upload
import random
import requests
# *********************************************************************
# INPUT
# *********************************************************************
username = ''
password = ''
foldername = ''
myproxy = ''
# tags generator
key = [
'marketing','emprendedores'
]
# photo keywords options
keywords_photo = [
'business-work',
'coworking',
'post-it',
'mobile',
'user-experience',
'workshop',
'small-business'
]
# quote keywords options
keywords_quote = [
'small_business','strategy',
'marketing',
'innovation',
'computers',
'workshop',
'enterprises',
'information_technology',
'new_technology','sales'
]
# *********************************************************************
# Random keywords
# *********************************************************************
targets = key
number = 1
random_targets = targets
if len(targets) <= number:
random_targets = targets
else:
keywords = random.sample(targets, number)
targets = keywords_photo
number = 1
random_targets = targets
if len(targets) <= number:
photo_key = targets
else:
photo_key = random.sample(targets, number)[0]
targets = keywords_quote
number = 1
random_targets = targets
if len(targets) <= number:
quote_key = targets
else:
quote_key = random.sample(targets, number)[0]
# *********************************************************************
# Now posting...control action via Cronjobs or Windows Task
# *********************************************************************
mycaption, myphoto = prep_post(keywords,photo_key,quote_key,foldername)
upload(username, password, myproxy, mycaption, myphoto)