-
Notifications
You must be signed in to change notification settings - Fork 0
/
mapping.py
48 lines (33 loc) · 1.37 KB
/
mapping.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
import random
from hashtags import popular_hashtags
def mapping():
D = popular_hashtags()
D.pop('Astrology')
D.pop('Environment')
D.pop('General')
trending_category = str(random.choice(D.keys()))
hashtag = str(random.choice(D[trending_category]))
entertainment = ['movies','television','music','theatre','art','singing','cartoons','comedy','comics','magic','pornography','science fiction','stunts','video games','radio']
social_change = ['politics','law','crime','espionage']
business = ['economics','business','finance']
tech = ['technology', 'aeronautics']
education = ['philosophy','literature','education']
if trending_category == 'TV/Entertainment':
genre = str(random.choice(entertainment))
opposite_genre = str(random.choice(education))
elif trending_category == 'Social Change':
genre = str(random.choice(social_change))
opposite_genre = str(random.choice(business))
elif trending_category == 'Business':
genre = str(random.choice(business))
opposite_genre = str(random.choice(social_change))
elif trending_category == 'Tech':
genre = str(random.choice(tech))
opposite_genre = str(random.choice(social_change))
elif trending_category == 'Education':
genre = str(random.choice(education))
opposite_genre = str(random.choice(entertainment))
return (genre,hashtag,opposite_genre)
if __name__ == "__main__":
x = mapping()
print x