Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 13 |
-
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 =
|
| 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 |
|