nilekhet commited on
Commit
9732dd2
1 Parent(s): ff61b19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -9,8 +9,8 @@ def get_hashtags(keyword):
9
  "X-RapidAPI-Host": "hashtagy-generate-hashtags.p.rapidapi.com"
10
  }
11
  response = requests.get(url, headers=headers, params={"keyword": keyword})
12
- print(response.json())
13
- data = response.json()['data']
14
  hashtags = data['best_30_hashtags']['hashtags']
15
  return ', '.join(hashtags)
16
 
@@ -22,8 +22,9 @@ def get_post_count(tag):
22
  "X-RapidAPI-Host": "hashtag5.p.rapidapi.com"
23
  }
24
  response = requests.get(url, headers=headers, params={"tag": tag})
 
25
  print(response.json())
26
- count = response.json()['count']
27
  return count
28
 
29
 
 
9
  "X-RapidAPI-Host": "hashtagy-generate-hashtags.p.rapidapi.com"
10
  }
11
  response = requests.get(url, headers=headers, params={"keyword": keyword})
12
+ response_json = response.json()
13
+ data = response_json['data']
14
  hashtags = data['best_30_hashtags']['hashtags']
15
  return ', '.join(hashtags)
16
 
 
22
  "X-RapidAPI-Host": "hashtag5.p.rapidapi.com"
23
  }
24
  response = requests.get(url, headers=headers, params={"tag": tag})
25
+ response_json = response.json()
26
  print(response.json())
27
+ count = response_json['count']
28
  return count
29
 
30