Spaces:
Runtime error
Runtime error
Commit
Β·
bf4f857
1
Parent(s):
c3837c5
fixed code bugs largely
Browse files- venv/.gitignore β .gitignore +0 -0
- Dockerfile +1 -1
- apis/reddit_apis.py +0 -0
- venv/app.py β app.py +132 -28
- competitor_analysis_report_1732440793211267.json +1 -0
- competitor_analysis_report_1732440793211269.json +1 -0
- competitor_analysis_report_1732440793211270.json +1 -0
- competitor_analysis_report_1732440793211272.json +1 -0
- competitor_analysis_report_1732440793211273.json +1 -0
- competitor_analysis_report_1732440793211274.json +1 -0
- {venv/models β models}/reddit_models.py +6 -0
- pain_point_analysis_1732440545295659.json +237 -0
- posts_data_1732439652695759.csv +15 -0
- posts_data_1732440545295659.csv +19 -0
- reddit/load_env.py +23 -0
- {venv/reddit β reddit}/prompts.py +1 -1
- {venv/reddit β reddit}/reddit_call.py +2 -2
- {venv/reddit β reddit}/reddit_competitor_analysis.py +23 -28
- {venv/reddit β reddit}/reddit_functions.py +21 -7
- {venv/reddit β reddit}/reddit_gemini.py +4 -4
- {venv/reddit β reddit}/reddit_pain_point_analysis.py +12 -4
- {venv/reddit β reddit}/reddit_search_scrapper.py +12 -10
- {venv/reddit β reddit}/reddit_sentiment_analysis.py +5 -4
- {venv/reddit β reddit}/reddit_utils.py +4 -0
- {venv/reddit β reddit}/scraping.py +88 -54
- requirements.txt +0 -0
- venv/test.py β test.py +227 -16
- user_data.csv +21 -0
- venv/utils.py β utils.py +0 -0
- venv/posts_data_1732244547776200.csv +0 -0
- venv/pyvenv.cfg +1 -1
- venv/reddit/api_keys.py +0 -13
- venv/reddit/reddit_community_post_scraper.py +0 -66
venv/.gitignore β .gitignore
RENAMED
|
File without changes
|
Dockerfile
CHANGED
|
@@ -28,4 +28,4 @@ ENV PATH="/app/venv/bin:$PATH"
|
|
| 28 |
EXPOSE 8000
|
| 29 |
|
| 30 |
# Run the application when the container launches
|
| 31 |
-
CMD ["uvicorn", "
|
|
|
|
| 28 |
EXPOSE 8000
|
| 29 |
|
| 30 |
# Run the application when the container launches
|
| 31 |
+
CMD ["uvicorn", "app:app", "--host", "127.0.0.23", "--port", "7860"]
|
apis/reddit_apis.py
ADDED
|
File without changes
|
venv/app.py β app.py
RENAMED
|
@@ -1,19 +1,33 @@
|
|
| 1 |
from collections import deque
|
| 2 |
-
|
|
|
|
| 3 |
from fastapi.middleware.cors import CORSMiddleware
|
| 4 |
-
from models.reddit_models import RedditPostDataModel
|
| 5 |
from reddit.reddit_functions import getRedditData
|
| 6 |
from reddit.reddit_gemini import getKeywords
|
| 7 |
-
from reddit.
|
| 8 |
import google.generativeai as genai
|
| 9 |
-
|
| 10 |
from reddit.reddit_pain_point_analysis import pain_point_analysis
|
|
|
|
| 11 |
from reddit.reddit_search_scrapper import getCompetitorAnalysisData
|
| 12 |
from utils import time_execution
|
| 13 |
-
app = FastAPI()
|
| 14 |
import asyncio
|
| 15 |
-
from fastapi import HTTPException
|
| 16 |
from asyncio import TimeoutError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# Assuming you have defined the necessary imports, e.g., config, getKeywords, api_key, api_key2
|
| 19 |
|
|
@@ -30,37 +44,72 @@ app.add_middleware(
|
|
| 30 |
allow_methods=["*"], # Allows all HTTP methods
|
| 31 |
allow_headers=["*"], # Allows all headers
|
| 32 |
)
|
| 33 |
-
from fastapi import FastAPI
|
| 34 |
-
from functools import wraps
|
| 35 |
-
|
| 36 |
-
app = FastAPI()
|
| 37 |
|
| 38 |
class Config:
|
| 39 |
def __init__(self):
|
| 40 |
self.called = False
|
| 41 |
-
self.
|
| 42 |
-
|
| 43 |
-
|
|
|
|
| 44 |
|
| 45 |
def configure(self, api_key):
|
| 46 |
genai.configure(api_key=api_key)
|
| 47 |
|
| 48 |
|
| 49 |
config = Config()
|
|
|
|
| 50 |
|
| 51 |
-
@app.get("/")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
@time_execution
|
| 53 |
def read_root():
|
| 54 |
if not config.called:
|
| 55 |
print("called", config.called)
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
else:
|
| 60 |
-
config.configure(api_key=api_key)
|
| 61 |
-
config.called = True
|
| 62 |
return {"message": "Hello, World!"}
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
# Timeout handler: check if getKeywords takes too long
|
| 65 |
async def fetch_keywords_with_timeout(user_query: str, timeout: int = 60, retry: bool = True):
|
| 66 |
try:
|
|
@@ -80,7 +129,7 @@ async def fetch_keywords_with_timeout(user_query: str, timeout: int = 60, retry:
|
|
| 80 |
# If we already tried once, handle as a failure or return a fallback response
|
| 81 |
raise HTTPException(status_code=504, detail="Request timed out even after retrying")
|
| 82 |
|
| 83 |
-
@
|
| 84 |
@time_execution
|
| 85 |
async def fetch_keywords(user_query: str):
|
| 86 |
if not user_query:
|
|
@@ -91,9 +140,9 @@ async def fetch_keywords(user_query: str):
|
|
| 91 |
return keywords
|
| 92 |
|
| 93 |
|
| 94 |
-
@
|
| 95 |
@time_execution
|
| 96 |
-
def getRedditPostsData(request: RedditPostDataModel):
|
| 97 |
"""Requires user_query and search_keywords as arguments.
|
| 98 |
Steps involved in this api:
|
| 99 |
1. get posts data from reddit
|
|
@@ -112,13 +161,13 @@ def getRedditPostsData(request: RedditPostDataModel):
|
|
| 112 |
if not search_keywords:
|
| 113 |
raise HTTPException(status_code=400, detail="Search keywords must not be empty")
|
| 114 |
print("user_query",user_query,"search_keywords",search_keywords)
|
| 115 |
-
result = getRedditData(user_query=user_query, search_keywords=search_keywords)
|
| 116 |
return result
|
| 117 |
except Exception as e:
|
| 118 |
raise HTTPException(status_code=500, detail=str(f"Failed to run getRedditPostsData : {e}"))
|
| 119 |
|
| 120 |
# pain point analysis api which takes user_query and fileName as arguments
|
| 121 |
-
@
|
| 122 |
@time_execution
|
| 123 |
def getPainPointAnalysis(user_query: str, fileName: str, uniqueFileId: str):
|
| 124 |
try:
|
|
@@ -136,7 +185,7 @@ def getPainPointAnalysis(user_query: str, fileName: str, uniqueFileId: str):
|
|
| 136 |
raise HTTPException(status_code=500, detail=str(f"Failed to run getPainPointAnalysis : {e}"))
|
| 137 |
|
| 138 |
# pain point analysis api which takes user_query and fileName as arguments
|
| 139 |
-
@
|
| 140 |
@time_execution
|
| 141 |
def getCompetitorAnalysis(user_query: str, fileName: str,isSolo=True):
|
| 142 |
try:
|
|
@@ -147,10 +196,65 @@ def getCompetitorAnalysis(user_query: str, fileName: str,isSolo=True):
|
|
| 147 |
if not fileName:
|
| 148 |
raise HTTPException(status_code=400, detail="fileName must not be empty")
|
| 149 |
print("user_query",user_query,"isSolo",isSolo,"fileName",fileName)
|
| 150 |
-
result = getCompetitorAnalysisData(user_query=user_query,
|
| 151 |
return result
|
| 152 |
except Exception as e:
|
| 153 |
raise HTTPException(status_code=500, detail=str(f"Failed to run getCompetitorAnalysis : {e}"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
# if __name__ == "__main__":
|
| 155 |
# import uvicorn
|
| 156 |
-
# uvicorn.run("main:app", host="127.0.0.23", workers=1,reload=True,port=786)
|
|
|
|
|
|
|
|
|
| 1 |
from collections import deque
|
| 2 |
+
import os
|
| 3 |
+
from fastapi import APIRouter, FastAPI, HTTPException
|
| 4 |
from fastapi.middleware.cors import CORSMiddleware
|
| 5 |
+
from models.reddit_models import AnalysisRequest, RedditPostDataModel
|
| 6 |
from reddit.reddit_functions import getRedditData
|
| 7 |
from reddit.reddit_gemini import getKeywords
|
| 8 |
+
from reddit.load_env import api_key
|
| 9 |
import google.generativeai as genai
|
| 10 |
+
from datetime import datetime
|
| 11 |
from reddit.reddit_pain_point_analysis import pain_point_analysis
|
| 12 |
+
from reddit.reddit_utils import services_names
|
| 13 |
from reddit.reddit_search_scrapper import getCompetitorAnalysisData
|
| 14 |
from utils import time_execution
|
|
|
|
| 15 |
import asyncio
|
| 16 |
+
from fastapi import HTTPException
|
| 17 |
from asyncio import TimeoutError
|
| 18 |
+
import pandas as pd
|
| 19 |
+
from scalar_fastapi import get_scalar_api_reference
|
| 20 |
+
from scalar_fastapi.scalar_fastapi import Layout
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
app = FastAPI(
|
| 24 |
+
debug=True,
|
| 25 |
+
title="NextAnalytics Server",
|
| 26 |
+
consumes=["application/x-www-form-urlencoded", "multipart/form-data"],
|
| 27 |
+
docs_url='/swagger'
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
router = APIRouter()
|
| 31 |
|
| 32 |
# Assuming you have defined the necessary imports, e.g., config, getKeywords, api_key, api_key2
|
| 33 |
|
|
|
|
| 44 |
allow_methods=["*"], # Allows all HTTP methods
|
| 45 |
allow_headers=["*"], # Allows all headers
|
| 46 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
class Config:
|
| 49 |
def __init__(self):
|
| 50 |
self.called = False
|
| 51 |
+
self.user_df=None
|
| 52 |
+
|
| 53 |
+
def initUserDf(self):
|
| 54 |
+
self.user_df=pd.DataFrame(pd.read_csv("user_data.csv"))
|
| 55 |
|
| 56 |
def configure(self, api_key):
|
| 57 |
genai.configure(api_key=api_key)
|
| 58 |
|
| 59 |
|
| 60 |
config = Config()
|
| 61 |
+
config.initUserDf()
|
| 62 |
|
| 63 |
+
@app.get("/docs", include_in_schema=False)
|
| 64 |
+
async def scalar_html():
|
| 65 |
+
return get_scalar_api_reference(
|
| 66 |
+
openapi_url=app.openapi_url,
|
| 67 |
+
title=app.title,
|
| 68 |
+
layout=Layout.CLASSIC,
|
| 69 |
+
servers= [
|
| 70 |
+
{
|
| 71 |
+
'url': os.getenv('BASE_URL') or f"http://127.0.0.23:7860",
|
| 72 |
+
},
|
| 73 |
+
]
|
| 74 |
+
)
|
| 75 |
+
@router.get("/")
|
| 76 |
@time_execution
|
| 77 |
def read_root():
|
| 78 |
if not config.called:
|
| 79 |
print("called", config.called)
|
| 80 |
+
config.configure(api_key=api_key)
|
| 81 |
+
config.called = True
|
| 82 |
+
|
|
|
|
|
|
|
|
|
|
| 83 |
return {"message": "Hello, World!"}
|
| 84 |
|
| 85 |
+
@router.post("/api/analyze")
|
| 86 |
+
async def analyze(request: AnalysisRequest):
|
| 87 |
+
if not request.user_query:
|
| 88 |
+
raise HTTPException(status_code=400, detail="User query must not be empty")
|
| 89 |
+
|
| 90 |
+
if not request.platform_names:
|
| 91 |
+
raise HTTPException(status_code=400, detail="platform_names must not be empty")
|
| 92 |
+
if not request.analysis_names:
|
| 93 |
+
raise HTTPException(status_code=400, detail="analysis_names must not be empty")
|
| 94 |
+
|
| 95 |
+
# Get the current date and time
|
| 96 |
+
now =datetime.utcnow().isoformat()
|
| 97 |
+
# Perform some analysis (this is just a placeholder for actual logic)
|
| 98 |
+
index=len(config.user_df)
|
| 99 |
+
config.user_df.loc[index,'index']=index
|
| 100 |
+
config.user_df.to_csv("user_data.csv",index=False)
|
| 101 |
+
config.user_df.loc[index,'timeStamp']=now
|
| 102 |
+
config.user_df.loc[index,'user_input'] = str(dict(request))
|
| 103 |
+
await analyzeData(index=index,inputData=request)
|
| 104 |
+
config.user_df.to_csv("user_data.csv",index=False)
|
| 105 |
+
response_data = {
|
| 106 |
+
'user_query': request.user_query,
|
| 107 |
+
'platform_names': request.platform_names,
|
| 108 |
+
'analysis_names': request.analysis_names,
|
| 109 |
+
'status': 'success',
|
| 110 |
+
'message': 'Analysis completed successfully.'
|
| 111 |
+
}
|
| 112 |
+
return response_data
|
| 113 |
# Timeout handler: check if getKeywords takes too long
|
| 114 |
async def fetch_keywords_with_timeout(user_query: str, timeout: int = 60, retry: bool = True):
|
| 115 |
try:
|
|
|
|
| 129 |
# If we already tried once, handle as a failure or return a fallback response
|
| 130 |
raise HTTPException(status_code=504, detail="Request timed out even after retrying")
|
| 131 |
|
| 132 |
+
@router.get("/keywords")
|
| 133 |
@time_execution
|
| 134 |
async def fetch_keywords(user_query: str):
|
| 135 |
if not user_query:
|
|
|
|
| 140 |
return keywords
|
| 141 |
|
| 142 |
|
| 143 |
+
@router.post("/getRedditPostsData")
|
| 144 |
@time_execution
|
| 145 |
+
async def getRedditPostsData(request: RedditPostDataModel):
|
| 146 |
"""Requires user_query and search_keywords as arguments.
|
| 147 |
Steps involved in this api:
|
| 148 |
1. get posts data from reddit
|
|
|
|
| 161 |
if not search_keywords:
|
| 162 |
raise HTTPException(status_code=400, detail="Search keywords must not be empty")
|
| 163 |
print("user_query",user_query,"search_keywords",search_keywords)
|
| 164 |
+
result = await getRedditData(user_query=user_query, search_keywords=search_keywords)
|
| 165 |
return result
|
| 166 |
except Exception as e:
|
| 167 |
raise HTTPException(status_code=500, detail=str(f"Failed to run getRedditPostsData : {e}"))
|
| 168 |
|
| 169 |
# pain point analysis api which takes user_query and fileName as arguments
|
| 170 |
+
@router.get("/getPainPointAnalysis")
|
| 171 |
@time_execution
|
| 172 |
def getPainPointAnalysis(user_query: str, fileName: str, uniqueFileId: str):
|
| 173 |
try:
|
|
|
|
| 185 |
raise HTTPException(status_code=500, detail=str(f"Failed to run getPainPointAnalysis : {e}"))
|
| 186 |
|
| 187 |
# pain point analysis api which takes user_query and fileName as arguments
|
| 188 |
+
@router.get("/getCompetitorAnalysis")
|
| 189 |
@time_execution
|
| 190 |
def getCompetitorAnalysis(user_query: str, fileName: str,isSolo=True):
|
| 191 |
try:
|
|
|
|
| 196 |
if not fileName:
|
| 197 |
raise HTTPException(status_code=400, detail="fileName must not be empty")
|
| 198 |
print("user_query",user_query,"isSolo",isSolo,"fileName",fileName)
|
| 199 |
+
result = getCompetitorAnalysisData(user_query=user_query,fileName=fileName)
|
| 200 |
return result
|
| 201 |
except Exception as e:
|
| 202 |
raise HTTPException(status_code=500, detail=str(f"Failed to run getCompetitorAnalysis : {e}"))
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
# main method for user end
|
| 207 |
+
async def analyzeData(index:int,inputData:AnalysisRequest):
|
| 208 |
+
try:
|
| 209 |
+
keywords = getKeywords(user_query=inputData.user_query)
|
| 210 |
+
config.user_df.loc[index,'gemini_input'] = str({
|
| 211 |
+
'query': keywords['query'],
|
| 212 |
+
'top_3_combinations': keywords['top_3_combinations']
|
| 213 |
+
})
|
| 214 |
+
result = await getRedditData(user_query=keywords['query'], search_keywords=keywords['top_3_combinations'])
|
| 215 |
+
config.user_df.loc[index,'file_with_sentiment'] = str({
|
| 216 |
+
'reddit_data': result['reddit_data'],
|
| 217 |
+
'sentiment_data':result['sentiment_data']
|
| 218 |
+
})
|
| 219 |
+
getServices(
|
| 220 |
+
index=index,
|
| 221 |
+
analysis_list=inputData.analysis_names,
|
| 222 |
+
user_query=keywords['query'],
|
| 223 |
+
fileName=result['fileName'],
|
| 224 |
+
uniqueFileId=result['fileUniqueId']
|
| 225 |
+
)
|
| 226 |
+
except Exception as e:
|
| 227 |
+
print("Failed to run analyzeData ", e)
|
| 228 |
+
raise HTTPException(status_code=500, detail=str(f"Failed to run analyzeData : {e}"))
|
| 229 |
+
|
| 230 |
+
def getServices(index, analysis_list, user_query=None, fileName=None, uniqueFileId=None):
|
| 231 |
+
# Pain point + Competitor Analysis
|
| 232 |
+
if services_names[0] in analysis_list and services_names[1] in analysis_list:
|
| 233 |
+
result=pain_point_analysis(user_query=user_query,fileName=fileName,uniqueFileId=uniqueFileId)
|
| 234 |
+
config.user_df.loc[index,'pain_point_analysis'] = str({
|
| 235 |
+
'e_time': result[2],
|
| 236 |
+
})
|
| 237 |
+
competitor_result = getCompetitorAnalysisData(user_query=user_query,fileName=fileName)
|
| 238 |
+
config.user_df.loc[index,'competitor_analysis'] = str({
|
| 239 |
+
"no_of_competitors": len(competitor_result['all_competitor_data']),
|
| 240 |
+
'e_time': competitor_result['e_time'],
|
| 241 |
+
})
|
| 242 |
+
# Pain point analysis only
|
| 243 |
+
elif services_names[0] in analysis_list:
|
| 244 |
+
result=pain_point_analysis(user_query=user_query,fileName=fileName,uniqueFileId=uniqueFileId)
|
| 245 |
+
config.user_df.loc[index,'pain_point_analysis'] = str({
|
| 246 |
+
'e_time': result[2],
|
| 247 |
+
})
|
| 248 |
+
# Competitor analysis only
|
| 249 |
+
elif services_names[1] in analysis_list:
|
| 250 |
+
competitor_result = getCompetitorAnalysisData(user_query=user_query,fileName=fileName)
|
| 251 |
+
config.user_df.loc[index,'competitor_analysis'] = str({
|
| 252 |
+
"no_of_competitors": len(competitor_result['all_competitor_data']),
|
| 253 |
+
'e_time': competitor_result['e_time'],
|
| 254 |
+
})
|
| 255 |
+
|
| 256 |
# if __name__ == "__main__":
|
| 257 |
# import uvicorn
|
| 258 |
+
# uvicorn.run("main:app", host="127.0.0.23", workers=1,reload=True,port=786)
|
| 259 |
+
|
| 260 |
+
app.include_router(router)
|
competitor_analysis_report_1732440793211267.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"competitor_analysis": {"competitor_name": "Tailwind", "overview": {"date_range": "2017-08-12 to 2024-08-16", "total_posts_analyzed": 13, "total_comments_analyzed": 37}, "market_sentiment": {"overall": {"positive": "60%", "neutral": "30%", "negative": "10%"}, "trend_over_time": {"2023-11": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2020-01": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2023-08": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2020-05": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2020-08": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2022-09": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2018-10": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2017-10": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2017-08": {"positive": "0%", "neutral": "100%", "negative": "0%"}, "2020-12": {"positive": "50%", "neutral": "0%", "negative": "50%"}, "2020-10": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2024-08": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2024-05": {"positive": "100%", "neutral": "0%", "negative": "0%"}}}, "pain_points": {}, "features_and_differentiators": [{"feature": "Tribes", "sentiment": "positive", "mentions": 4, "related_comments": []}, {"feature": "Scheduling", "sentiment": "positive", "mentions": 3, "related_comments": []}], "sentiment_by_feature": {"Tribes": {"positive": "75%", "neutral": "25%", "negative": "0%"}, "Scheduling": {"positive": "100%", "neutral": "0%", "negative": "0%"}}, "audience_analysis": {"popular_subreddits": ["Pinterest", "socialmedia", "freesoftwareshub", "EtsySellers", "Blogging", "marketing", "saasproductsupdates"], "user_segments": ["Etsy Sellers", "Bloggers", "Marketers", "Pinterest Users", "Social Media Managers"]}, "pricing_feedback": {"value_perception": {"positive": "0%", "neutral": "0%", "negative": "0%"}, "related_comments": []}, "competitor_strengths": ["Effective for increasing impressions and reach on Pinterest.", "Useful scheduling features.", "Tribes feature facilitates community engagement.", "Widely used and recommended within relevant communities."], "competitor_weaknesses": ["Some negative sentiment regarding Tailwind Tribes effectiveness.", "Limited data on pricing feedback."], "user_recommendations": ["Focus on highlighting the positive impact of Tailwind on Pinterest marketing.", "Gather more data on user experiences with pricing and value.", "Investigate and address concerns regarding Tailwind Tribes.", "Continue monitoring user feedback in relevant communities."], "competitive_strategy": {"pricing_strategy": "Monitor competitor pricing and offer competitive rates.", "feature_improvement": "Explore potential improvements to the Tribes feature based on user feedback."}}}
|
competitor_analysis_report_1732440793211269.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"competitor_analysis": {"competitor_name": "Later", "overview": {"date_range": "2018-06-09 to 2024-11-12", "total_posts_analyzed": 10, "total_comments_analyzed": 1408}, "market_sentiment": {"overall": {"positive": "70%", "neutral": "20%", "negative": "10%"}, "trend_over_time": {"2023-05": {"positive": "50%", "neutral": "40%", "negative": "10%"}, "2023-08": {"positive": "60%", "neutral": "20%", "negative": "20%"}, "2023-11": {"positive": "80%", "neutral": "15%", "negative": "5%"}, "2023-12": {"positive": "90%", "neutral": "5%", "negative": "5%"}, "2024-06": {"positive": "70%", "neutral": "20%", "negative": "10%"}, "2024-10": {"positive": "60%", "neutral": "30%", "negative": "10%"}, "2024-11": {"positive": "50%", "neutral": "30%", "negative": "20%"}}}, "pain_points": {}, "features_and_differentiators": [], "sentiment_by_feature": {}, "audience_analysis": {"popular_subreddits": ["r/IAmA", "r/marketing", "r/SocialMediaMarketing", "r/socialmedia", "r/DigitalToolsReview", "r/FreeLinkInBio"], "user_segments": ["Marketers", "Social Media Managers", "Business Owners", "Cloud Storage Users"]}, "pricing_feedback": {"value_perception": {"positive": "60%", "neutral": "30%", "negative": "10%"}, "related_comments": []}, "competitor_strengths": [], "competitor_weaknesses": [], "user_recommendations": [], "competitive_strategy": {"pricing_strategy": "Analyze Later's pricing model and identify opportunities to offer competitive pricing while highlighting superior value.", "feature_improvement": "Focus on developing and enhancing features that directly address user pain points and offer unique functionalities not available in Later."}}}
|
competitor_analysis_report_1732440793211270.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"competitor_analysis": {"competitor_name": "Buffer", "overview": {"date_range": "2014-12-09 to 2024-11-12", "total_posts_analyzed": 17, "total_comments_analyzed": 233}, "market_sentiment": {"overall": {"positive": "0", "neutral": "0", "negative": "0"}, "trend_over_time": {}}, "pain_points": null, "features_and_differentiators": [], "sentiment_by_feature": {}, "audience_analysis": {"popular_subreddits": ["r/socialmedia", "r/digital_marketing", "r/SocialMediaMarketing", "r/selfhosted", "r/AskMarketing", "r/SocialMediaManagers", "r/marketing", "r/reviewxreddit"], "user_segments": []}, "pricing_feedback": {"value_perception": {"positive": "0", "neutral": "0", "negative": "0"}, "related_comments": []}, "competitor_strengths": [], "competitor_weaknesses": [], "user_recommendations": [], "competitive_strategy": {}}}
|
competitor_analysis_report_1732440793211272.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"competitor_analysis": {"competitor_name": "Google Analytics", "overview": {"date_range": "2019-06-24 to 2024-11-12", "total_posts_analyzed": 19, "total_comments_analyzed": 579}, "market_sentiment": {"overall": {"positive": "30%", "neutral": "40%", "negative": "30%"}, "trend_over_time": {"2023-10": {"positive": "20%", "neutral": "50%", "negative": "30%"}, "2024-02": {"positive": "10%", "neutral": "10%", "negative": "80%"}, "2024-05": {"positive": "10%", "neutral": "40%", "negative": "50%"}, "2024-09": {"positive": "40%", "neutral": "40%", "negative": "20%"}, "2021-10": {"positive": "60%", "neutral": "30%", "negative": "10%"}, "2024-10": {"positive": "20%", "neutral": "30%", "negative": "50%"}, "2021-08": {"positive": "70%", "neutral": "20%", "negative": "10%"}, "2024-07": {"positive": "50%", "neutral": "30%", "negative": "20%"}, "2019-06": {"positive": "0%", "neutral": "10%", "negative": "90%"}, "2021-01": {"positive": "60%", "neutral": "20%", "negative": "20%"}, "2020-11": {"positive": "0%", "neutral": "40%", "negative": "60%"}, "2023-03": {"positive": "80%", "neutral": "20%", "negative": "0%"}, "2024-08": {"positive": "60%", "neutral": "40%", "negative": "0%"}, "2020-10": {"positive": "60%", "neutral": "30%", "negative": "10%"}, "2024-11": {"positive": "50%", "neutral": "50%", "negative": "0%"}}}, "pain_points": {"Data Privacy": {"category": "Data Privacy", "pain_point": "Concerns about data privacy and Google's use of user data.", "frequency": 30, "sentiment_analysis": {"positive": 5, "neutral": 10, "negative": 15}, "related_features": [], "examples": [], "recommended_actions": []}, "Setup Complexity": {"category": "Setup Complexity", "pain_point": "Difficulty in setting up and configuring Google Analytics, especially GA4.", "frequency": 20, "sentiment_analysis": {"positive": 5, "neutral": 5, "negative": 10}, "related_features": [], "examples": [], "recommended_actions": []}, "Performance Impact": {"category": "Performance Impact", "pain_point": "Impact of Google Analytics on website performance due to large code size.", "frequency": 10, "sentiment_analysis": {"positive": 2, "neutral": 3, "negative": 5}, "related_features": [], "examples": [], "recommended_actions": []}}, "features_and_differentiators": [], "sentiment_by_feature": {}, "audience_analysis": {"popular_subreddits": ["webdev", "analytics", "privacy", "SEO", "golang", "selfhosted", "GoogleAnalytics", "SaaS", "GoogleTagManager", "framer"], "user_segments": ["Web Developers", "SEO Specialists", "Privacy Advocates", "Data Analysts", "Business Owners"]}, "pricing_feedback": {"value_perception": {"positive": 0, "neutral": 0, "negative": 0}, "related_comments": []}, "competitor_strengths": [], "competitor_weaknesses": [], "user_recommendations": [], "competitive_strategy": {}}}
|
competitor_analysis_report_1732440793211273.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"competitor_analysis": {"competitor_name": "Shopify", "overview": {"date_range": "2021-12-29 to 2024-11-23", "total_posts_analyzed": 17, "total_comments_analyzed": 557}, "market_sentiment": {"overall": {"positive": "30%", "neutral": "40%", "negative": "30%"}, "trend_over_time": {"2022-10": {"positive": "40%", "neutral": "30%", "negative": "30%"}, "2023-01": {"positive": "35%", "neutral": "40%", "negative": "25%"}, "2023-02": {"positive": "45%", "neutral": "30%", "negative": "25%"}, "2023-05": {"positive": "30%", "neutral": "40%", "negative": "30%"}, "2023-11": {"positive": "40%", "neutral": "20%", "negative": "40%"}, "2024-02": {"positive": "25%", "neutral": "50%", "negative": "25%"}, "2024-05": {"positive": "20%", "neutral": "40%", "negative": "40%"}, "2024-06": {"positive": "35%", "neutral": "35%", "negative": "30%"}, "2024-07": {"positive": "40%", "neutral": "40%", "negative": "20%"}, "2024-08": {"positive": "45%", "neutral": "35%", "negative": "20%"}, "2024-09": {"positive": "30%", "neutral": "40%", "negative": "30%"}, "2024-10": {"positive": "25%", "neutral": "50%", "negative": "25%"}, "2024-11": {"positive": "30%", "neutral": "30%", "negative": "40%"}}}, "pain_points": {"pain_points": [{"category": "Pricing\\Value", "pain_point": "High Costs\\Value", "frequency": 34, "sentiment_analysis": {"positive": 10, "neutral": 15, "negative": 9}, "related_features": ["Shopify Payments", "Transaction fees", "Monthly subscriptions"], "examples": [], "recommended_actions": []}, {"category": "Usability\\Features", "pain_point": "Complex Features", "frequency": 28, "sentiment_analysis": {"positive": 8, "neutral": 12, "negative": 8}, "related_features": ["App integrations", "Theme customization", "Product management"], "examples": [], "recommended_actions": []}, {"category": "Customer\\Support", "pain_point": "Unresponsive Support", "frequency": 22, "sentiment_analysis": {"positive": 5, "neutral": 8, "negative": 9}, "related_features": ["Help center", "Email support", "Live chat"], "examples": [], "recommended_actions": []}]}, "features_and_differentiators": [], "sentiment_by_feature": {}, "audience_analysis": {"popular_subreddits": ["r\\shopify", "r\\ecommerce", "r\\Wordpress"], "user_segments": ["Beginners", "Small business owners", "Experienced developers"]}, "pricing_feedback": {"value_perception": {"positive": "40%", "neutral": "35%", "negative": "25%"}, "related_comments": []}, "competitor_strengths": ["Ease of use", "Large app ecosystem", "Scalability"], "competitor_weaknesses": ["High costs", "Complex features", "Limited customization"], "user_recommendations": ["Consider alternatives for beginners", "Evaluate pricing plans carefully", "Explore custom development options"], "competitive_strategy": {"pricing_strategy": "Offer competitive pricing and flexible plans", "feature_improvement": "Simplify complex features and improve user experience"}}}
|
competitor_analysis_report_1732440793211274.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"competitor_analysis": {"competitor_name": "Pinterest", "overview": {"date_range": "2019-01-01 to 2024-07-18", "total_posts_analyzed": 10, "total_comments_analyzed": 41}, "market_sentiment": {"overall": {"positive": "70%", "neutral": "20%", "negative": "10%"}, "trend_over_time": {"2019-01": {"positive": "50%", "neutral": "50%", "negative": "0%"}, "2020-02": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2020-06": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2023-04": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2023-08": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2023-11": {"positive": "100%", "neutral": "0%", "negative": "0%"}, "2023-12": {"positive": "0%", "neutral": "100%", "negative": "0%"}, "2024-07": {"positive": "100%", "neutral": "0%", "negative": "0%"}}}, "pain_points": [], "features_and_differentiators": [], "sentiment_by_feature": {}, "audience_analysis": {"popular_subreddits": ["r/bigdata", "r/dataengineering", "r/java", "r/Edchart", "r/bigdata_analytics"], "user_segments": ["Data Engineers", "Big Data Professionals", "Java Developers"]}, "pricing_feedback": {"value_perception": {"positive": "0%", "neutral": "0%", "negative": "0%"}, "related_comments": []}, "competitor_strengths": [], "competitor_weaknesses": [], "user_recommendations": [], "competitive_strategy": {}}}
|
{venv/models β models}/reddit_models.py
RENAMED
|
@@ -4,3 +4,9 @@ from pydantic import BaseModel
|
|
| 4 |
class RedditPostDataModel(BaseModel):
|
| 5 |
user_query: str
|
| 6 |
search_keywords: List[str]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
class RedditPostDataModel(BaseModel):
|
| 5 |
user_query: str
|
| 6 |
search_keywords: List[str]
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class AnalysisRequest(BaseModel):
|
| 10 |
+
user_query: str
|
| 11 |
+
platform_names: List[str]
|
| 12 |
+
analysis_names: List[str]
|
pain_point_analysis_1732440545295659.json
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"pain_point_categories": [
|
| 3 |
+
"Data Accuracy",
|
| 4 |
+
"Inaccurate Reporting",
|
| 5 |
+
"Confusing Interface",
|
| 6 |
+
"Outdated Information",
|
| 7 |
+
"Actionable Insights",
|
| 8 |
+
"Algorithm Issues"
|
| 9 |
+
],
|
| 10 |
+
"pain_point_analysis": {
|
| 11 |
+
"key_insights": [
|
| 12 |
+
"Users struggle with Pinterest analytics data accuracy and reliability.",
|
| 13 |
+
"The platform's reporting inconsistencies create confusion and frustration.",
|
| 14 |
+
"Users find it challenging to extract actionable business insights from Pinterest data.",
|
| 15 |
+
"Pinterest's algorithm can hinder content visibility and engagement.",
|
| 16 |
+
"Outdated information and content detract from the platform's usefulness."
|
| 17 |
+
],
|
| 18 |
+
"pain_points": [
|
| 19 |
+
{
|
| 20 |
+
"category": "Data Accuracy",
|
| 21 |
+
"pain_point": "Discrepancies between Pinterest analytics and other platforms (e.g., Google Analytics, Shopify).",
|
| 22 |
+
"frequency": 2,
|
| 23 |
+
"sentiment_analysis": {
|
| 24 |
+
"positive": 0,
|
| 25 |
+
"neutral": 2,
|
| 26 |
+
"negative": 0
|
| 27 |
+
},
|
| 28 |
+
"related_features": [
|
| 29 |
+
"Analytics Dashboard",
|
| 30 |
+
"Data Integration"
|
| 31 |
+
],
|
| 32 |
+
"examples": [
|
| 33 |
+
{
|
| 34 |
+
"post_title": "Pinterest Ad Analytics Not Matching Google & Shopify Analytics",
|
| 35 |
+
"comment": "Hi all, I recently started advertising on Pinterest and for the first 3-4 days, things were great. I was getting 150-200 link clicks/day at around $.10/click. My Shopify analytics and Google Analytics supported those link clinks (though they were off a bit, but from what I've read, this isn't out of the ordinary, by about 10%-20%).",
|
| 36 |
+
"upvotes": 5,
|
| 37 |
+
"post_url": "https://www.reddit.com/r/ecommerce/comments/j5664h/pinterest_ad_analytics_not_matching_google/"
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"post_title": "Pinterest Analytics Off?",
|
| 41 |
+
"comment": "They\u2019ve never had good analytics!! I keep an eye on it for trends purposes but not for accuracy.\nI always check my Google Analytics for actual traffic from Pinterest",
|
| 42 |
+
"upvotes": 12,
|
| 43 |
+
"post_url": "https://www.reddit.com/r/Pinterest/comments/jtg2ru/pinterest_analytics_off/"
|
| 44 |
+
}
|
| 45 |
+
],
|
| 46 |
+
"recommended_actions": [
|
| 47 |
+
"Improve data accuracy and consistency across platforms.",
|
| 48 |
+
"Provide clear documentation on data discrepancies and how to reconcile them.",
|
| 49 |
+
"Offer tools or integrations for seamless data comparison and analysis."
|
| 50 |
+
]
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"category": "Inaccurate Reporting",
|
| 54 |
+
"pain_point": "Missing or incorrect data in Pinterest analytics, including impressions, clicks, and other metrics.",
|
| 55 |
+
"frequency": 3,
|
| 56 |
+
"sentiment_analysis": {
|
| 57 |
+
"positive": 0,
|
| 58 |
+
"neutral": 1,
|
| 59 |
+
"negative": 2
|
| 60 |
+
},
|
| 61 |
+
"related_features": [
|
| 62 |
+
"Analytics Dashboard",
|
| 63 |
+
"Data Reporting"
|
| 64 |
+
],
|
| 65 |
+
"examples": [
|
| 66 |
+
{
|
| 67 |
+
"post_title": "Is Pinterest Analytics Not Working?",
|
| 68 |
+
"comment": "Anyone else having issues with Pinterest analytics? I\u2019m seeing only 1 impression and no other data. Is anyone else experiencing the same problem?",
|
| 69 |
+
"upvotes": 1,
|
| 70 |
+
"post_url": "https://www.reddit.com/r/Blogging/comments/1gplajl/is_pinterest_analytics_not_working/"
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"post_title": "Pinterest Analytics Acting Up Today? Showing Only 1 Impression Despite Multiple Clicks",
|
| 74 |
+
"comment": "Is anyone else having issues with Pinterest Analytics today? I'm seeing impressions and clicks on my pins, but the analytics dashboard is only showing 1 impression. Last night, it was displaying all the correct data. Is there an update happening, or is it just me?",
|
| 75 |
+
"upvotes": 1,
|
| 76 |
+
"post_url": "https://www.reddit.com/r/Pinterest/comments/1gpejc2/pinterest_analytics_acting_up_today_showing_only/"
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"post_title": "Is anyone else losing Pinterest analytics data for some days?",
|
| 80 |
+
"comment": "Hi! A few days ago - all data of metrics were lost for the dates 20th and 21st August suddenly and now when I checked - the data is gone from 22nd to 25th July as well. All the metrics from those days are now zero.",
|
| 81 |
+
"upvotes": 9,
|
| 82 |
+
"post_url": "https://www.reddit.com/r/Pinterest/comments/1fikpok/is_anyone_else_losing_pinterest_analytics_data/"
|
| 83 |
+
}
|
| 84 |
+
],
|
| 85 |
+
"recommended_actions": [
|
| 86 |
+
"Address data reporting issues promptly and transparently.",
|
| 87 |
+
"Implement robust data validation and error detection mechanisms.",
|
| 88 |
+
"Provide clear communication channels for users to report data inaccuracies."
|
| 89 |
+
]
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"category": "Confusing Interface",
|
| 93 |
+
"pain_point": "Difficulty understanding and interpreting Pinterest analytics data.",
|
| 94 |
+
"frequency": 2,
|
| 95 |
+
"sentiment_analysis": {
|
| 96 |
+
"positive": 0,
|
| 97 |
+
"neutral": 2,
|
| 98 |
+
"negative": 0
|
| 99 |
+
},
|
| 100 |
+
"related_features": [
|
| 101 |
+
"Analytics Dashboard",
|
| 102 |
+
"User Interface"
|
| 103 |
+
],
|
| 104 |
+
"examples": [
|
| 105 |
+
{
|
| 106 |
+
"post_title": "Pinterest Analytics",
|
| 107 |
+
"comment": "Hi, I have a company and we are very active across social media and have recently started posting more on Pinterest. I am looking to take data from my posts / pins to see how we can improve. At the moment, I am struggling to navigate the 'analytics' section as the data is hard to interpret. Does anybody have any recommendations of ways to best use the data? Thanks!",
|
| 108 |
+
"upvotes": 1,
|
| 109 |
+
"post_url": "https://www.reddit.com/r/Pinterest/comments/rwit49/pinterest_analytics/"
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"post_title": "Pinterest Analytics - Impressions vs Monthly views not matching?",
|
| 113 |
+
"comment": "Sorry if this has been asked before, but Pinterest's documentation is quite useless to date.",
|
| 114 |
+
"upvotes": 2,
|
| 115 |
+
"post_url": "https://www.reddit.com/r/Pinterest/comments/12x8zor/pinterest_analytics_impressions_vs_monthly_views/"
|
| 116 |
+
}
|
| 117 |
+
],
|
| 118 |
+
"recommended_actions": [
|
| 119 |
+
"Simplify the analytics interface and improve data visualization.",
|
| 120 |
+
"Provide detailed documentation and tutorials on how to use Pinterest analytics effectively.",
|
| 121 |
+
"Offer personalized support and guidance for users struggling with data interpretation."
|
| 122 |
+
]
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"category": "Outdated Information",
|
| 126 |
+
"pain_point": "Pinterest's content and analytics can be outdated, hindering effective analysis and decision-making.",
|
| 127 |
+
"frequency": 2,
|
| 128 |
+
"sentiment_analysis": {
|
| 129 |
+
"positive": 0,
|
| 130 |
+
"neutral": 1,
|
| 131 |
+
"negative": 1
|
| 132 |
+
},
|
| 133 |
+
"related_features": [
|
| 134 |
+
"Content Relevance",
|
| 135 |
+
"Algorithm"
|
| 136 |
+
],
|
| 137 |
+
"examples": [
|
| 138 |
+
{
|
| 139 |
+
"post_title": "Using Pinterest to Help Find Your Style (or: how to tell Pinterest it is no longer 2012)",
|
| 140 |
+
"comment": "Hi FFA! It is frequently acknowledged around here that Pinterest can be difficult to use for finding personal style, or that it is simply an outdated platform for doing so. However, there are definitely ways to curb some of the more dated pins and organize your saved items to cobble together a cohesive style. Here, I'd like to share some of the Pinterest approaches that have worked for me. I've shared both some tips and some examples from my own pinterest boards.",
|
| 141 |
+
"upvotes": 1332,
|
| 142 |
+
"post_url": "https://www.reddit.com/r/femalefashionadvice/comments/lb5mkb/using_pinterest_to_help_find_your_style_or_how_to/"
|
| 143 |
+
},
|
| 144 |
+
{
|
| 145 |
+
"post_title": "How exactly do Pinterest analytics work? Do impressions, pin clicks, etc. reset to zero at certain points?",
|
| 146 |
+
"comment": "About a month ago I was looking at my \"Top Pins\" on the dashboard. One day my pins had 20ish impressions, next day they all said 0. They started collecting impression, etx. as usual, but seemed to all start from 0 and not pick up from the old stats.",
|
| 147 |
+
"upvotes": 2,
|
| 148 |
+
"post_url": "https://www.reddit.com/r/Pinterest/comments/1bmo7h6/how_exactly_do_pinterest_analytics_work_do/"
|
| 149 |
+
}
|
| 150 |
+
],
|
| 151 |
+
"recommended_actions": [
|
| 152 |
+
"Implement mechanisms to refresh content and remove outdated information.",
|
| 153 |
+
"Improve algorithm to prioritize relevant and timely content.",
|
| 154 |
+
"Provide tools for users to filter and curate content based on date and relevance."
|
| 155 |
+
]
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"category": "Actionable Insights",
|
| 159 |
+
"pain_point": "Difficulty translating Pinterest data into actionable strategies for business growth.",
|
| 160 |
+
"frequency": 2,
|
| 161 |
+
"sentiment_analysis": {
|
| 162 |
+
"positive": 0,
|
| 163 |
+
"neutral": 2,
|
| 164 |
+
"negative": 0
|
| 165 |
+
},
|
| 166 |
+
"related_features": [
|
| 167 |
+
"Analytics Interpretation",
|
| 168 |
+
"Business Strategy"
|
| 169 |
+
],
|
| 170 |
+
"examples": [
|
| 171 |
+
{
|
| 172 |
+
"post_title": "Can Pinterest help generate business?",
|
| 173 |
+
"comment": "I runned my Pinterest pins for over a year, with followers of 204 numbers; and monthly reviews of 138k. My doubt is that I don't find inquiry for wholesale or retailer. Only small group of people ask and never reply after I updated them. My question is Pinterst is only a platform for sharing? no for generating business?",
|
| 174 |
+
"upvotes": 4,
|
| 175 |
+
"post_url": "https://www.reddit.com/r/Pinterest/comments/10xkuku/can_pinterest_help_generate_business/"
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"post_title": "Is anybody successful using Pinterest as a marketing tactic as an artist?",
|
| 179 |
+
"comment": "I see a lot of artists have success on Pinterest but don\u2019t know if there are any good resources to figure out this platform? If you are having success would you be willing to share some tips?.",
|
| 180 |
+
"upvotes": 26,
|
| 181 |
+
"post_url": "https://www.reddit.com/r/artbusiness/comments/15fr3k6/is_anybody_successful_using_pinterest_as_a/"
|
| 182 |
+
}
|
| 183 |
+
],
|
| 184 |
+
"recommended_actions": [
|
| 185 |
+
"Provide more actionable insights and recommendations within the analytics dashboard.",
|
| 186 |
+
"Offer educational resources and case studies on how to leverage Pinterest data for business growth.",
|
| 187 |
+
"Develop tools or features that facilitate data-driven decision-making for businesses."
|
| 188 |
+
]
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"category": "Algorithm Issues",
|
| 192 |
+
"pain_point": "Pinterest's algorithm can negatively impact content visibility and reach, making it difficult for businesses to connect with their target audience.",
|
| 193 |
+
"frequency": 1,
|
| 194 |
+
"sentiment_analysis": {
|
| 195 |
+
"positive": 0,
|
| 196 |
+
"neutral": 1,
|
| 197 |
+
"negative": 0
|
| 198 |
+
},
|
| 199 |
+
"related_features": [
|
| 200 |
+
"Algorithm",
|
| 201 |
+
"Content Visibility"
|
| 202 |
+
],
|
| 203 |
+
"examples": [
|
| 204 |
+
{
|
| 205 |
+
"post_title": "Using Pinterest to Help Find Your Style (or: how to tell Pinterest it is no longer 2012)",
|
| 206 |
+
"comment": "Hi FFA! It is frequently acknowledged around here that Pinterest can be difficult to use for finding personal style, or that it is simply an outdated platform for doing so.",
|
| 207 |
+
"upvotes": 1332,
|
| 208 |
+
"post_url": "https://www.reddit.com/r/femalefashionadvice/comments/lb5mkb/using_pinterest_to_help_find_your_style_or_how_to/"
|
| 209 |
+
}
|
| 210 |
+
],
|
| 211 |
+
"recommended_actions": [
|
| 212 |
+
"Provide more transparency and control over the algorithm's impact on content visibility.",
|
| 213 |
+
"Offer tools or features that allow businesses to optimize their content for the algorithm.",
|
| 214 |
+
"Provide educational resources on how to effectively navigate and leverage the Pinterest algorithm."
|
| 215 |
+
]
|
| 216 |
+
}
|
| 217 |
+
],
|
| 218 |
+
"overall_insights": {
|
| 219 |
+
"top_pain_points": [
|
| 220 |
+
"Data Accuracy",
|
| 221 |
+
"Inaccurate Reporting",
|
| 222 |
+
"Actionable Insights"
|
| 223 |
+
],
|
| 224 |
+
"user_segments_most_affected": [
|
| 225 |
+
"Businesses",
|
| 226 |
+
"Marketers",
|
| 227 |
+
"E-commerce Owners"
|
| 228 |
+
],
|
| 229 |
+
"impact_on_product_development": [
|
| 230 |
+
"Prioritize development efforts on improving data accuracy and reporting.",
|
| 231 |
+
"Enhance the analytics dashboard with more actionable insights and recommendations.",
|
| 232 |
+
"Simplify the user interface and improve data visualization.",
|
| 233 |
+
"Provide more transparency and control over the algorithm and its impact on content visibility."
|
| 234 |
+
]
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
}
|
posts_data_1732439652695759.csv
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
index,comment_count,votes_count,title,url,time
|
| 2 |
+
1,29,7,Thoughts on Hootsuite as a Social Media Management Tool,https://www.reddit.com/r/SocialMediaMarketing/comments/1eauukx/thoughts_on_hootsuite_as_a_social_media/,2024-07-24T06:55:11.633Z
|
| 3 |
+
3,16,6,Hootsuite vs Social Media Manager?,https://www.reddit.com/r/SocialMediaMarketing/comments/enxz6u/hootsuite_vs_social_media_manager/,2020-01-13T02:47:39.689Z
|
| 4 |
+
7,29,19,Looking for a Hootsuite Alternative,https://www.reddit.com/r/socialmedia/comments/1b33uw0/looking_for_a_hootsuite_alternative/,2024-02-29T16:03:36.034Z
|
| 5 |
+
21,24,13,Should I ask my client to cover the cost of management software like Hootsuite or Sendible?,https://www.reddit.com/r/socialmedia/comments/etvtuu/should_i_ask_my_client_to_cover_the_cost_of/,2020-01-25T20:08:41.014Z
|
| 6 |
+
27,2,1,SocialBee vs Hootsuite: Which is Your Go-To for Social Media Management?,https://www.reddit.com/r/DigitalToolsReview/comments/17qtbqp/socialbee_vs_hootsuite_which_is_your_goto_for/,2023-11-08T19:23:23.272Z
|
| 7 |
+
29,19,13,Self-Hosted Social Media Management Tool Similar to Hootsuite,https://www.reddit.com/r/selfhosted/comments/g79p9g/selfhosted_social_media_management_tool_similar/,2020-04-24T14:50:11.356Z
|
| 8 |
+
31,21,3,Do people use Hootsuite?,https://www.reddit.com/r/socialmedia/comments/szy608/do_people_use_hootsuite/,2022-02-24T01:36:07.212Z
|
| 9 |
+
39,12,2,Hootsuite or Alternative,https://www.reddit.com/r/socialmedia/comments/1cua13z/hootsuite_or_alternative/,2024-05-17T16:45:34.764Z
|
| 10 |
+
45,5,5,Social Listening on Hootsuite,https://www.reddit.com/r/socialmedia/comments/g4ws9c/social_listening_on_hootsuite/,2020-04-20T17:10:15.988Z
|
| 11 |
+
47,10,4,Which Social Media Management Tool is Better? | Buffer | Hootsuite | AgoraPulse | Other?,https://www.reddit.com/r/AskMarketing/comments/fhgaeh/which_social_media_management_tool_is_better/,2020-03-12T13:25:30.004Z
|
| 12 |
+
49,9,3,Hootsuite or other social media management tools?,https://www.reddit.com/r/PartneredYoutube/comments/18wxlgd/hootsuite_or_other_social_media_management_tools/,2024-01-02T19:16:58.163Z
|
| 13 |
+
54,8,4,Will Hootsuite integrate Bluesky?,https://www.reddit.com/r/SocialMediaMarketing/comments/1guy5xf/will_hootsuite_integrate_bluesky/,2024-11-19T14:18:09.529Z
|
| 14 |
+
56,10,3,"Do you use a social media mangement tool, such as Hootsuite, MeetEdgar, or anything else?",https://www.reddit.com/r/socialmedia/comments/7xrrgr/do_you_use_a_social_media_mangement_tool_such_as/,2018-02-15T17:05:58.287Z
|
| 15 |
+
70,26,10,Is Hootsuite certification worth it?,https://www.reddit.com/r/socialmedia/comments/11fibcz/is_hootsuite_certification_worth_it/,2023-03-01T21:14:53.231Z
|
posts_data_1732440545295659.csv
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
comment_count,votes_count,title,url,time,similarity,comments,descriptions
|
| 2 |
+
8,34,An analysis of my recent experience with pinterest paid ads,https://www.reddit.com/r/redbubble/comments/112nobm/an_analysis_of_my_recent_experience_with/,2023-02-15T02:53:05.139Z,0.5827611,"{'comments': [{'comment': ""This is a great analysis and very well explained, thank you so much! I'm sorry you didn't get more sales but it seems like you approached it the right way - doing the experiment for its own sake as much as for any other results."", 'emotion': [{'label': 'gratitude', 'score': 0.9475171566009521}, {'label': 'admiration', 'score': 0.4449874460697174}, {'label': 'remorse', 'score': 0.2753154933452606}], 'replies': [{'comment': ""Thanks! I'm glad someone found some use for it hahaha. It's a lot to read! But it's the kind of thing I look for when deciding how to go about stuff like this so hopefully it helps some people."", 'emotion': [{'label': 'gratitude', 'score': 0.8782341480255127}, {'label': 'optimism', 'score': 0.5548713207244873}, {'label': 'joy', 'score': 0.4143174886703491}], 'replies': []}]}, {'comment': 'Very interesting. Thanks for sharing! \n\nI really want to put more effort into Pinterest for promoting, but I find it such a boring app and concept.', 'emotion': [{'label': 'gratitude', 'score': 0.9451431035995483}, {'label': 'desire', 'score': 0.1822127401828766}, {'label': 'admiration', 'score': 0.07187686860561371}], 'replies': [{'comment': ""So boring! And the format size is weird. I guess it's based on a phone screen shape? But downloading product mockups doesn't fit properly right off the bat. \n\nAll my social media for the redbubble shop does terribly though hahaha. My Instagram page just for my art does a bit better for followers but it doesn't get outbound clicks. At least Pinterest lets you make the image connect to a link."", 'emotion': [{'label': 'amusement', 'score': 0.6284758448600769}, {'label': 'annoyance', 'score': 0.2989484965801239}, {'label': 'disapproval', 'score': 0.13687361776828766}], 'replies': [{'comment': ""Hahaha. I thought most people like Pinterest. I'm still hoping it's gonna suddenly be interesting and inspiring. Maybe getting clicks from it would help. I only have 350 followers on Instagram, but I always get clicks from links in my story. I was lucky to post something in a niche with the right hashtags the other day, and it got shared in two stories by strangers. Good numbers. Want to chase that high again. Direct links are definitely the big thing. People need the shortest route to the shop."", 'emotion': [{'label': 'optimism', 'score': 0.627533495426178}, {'label': 'admiration', 'score': 0.5962627530097961}, {'label': 'amusement', 'score': 0.366283655166626}], 'replies': [{'comment': ""So funny, I've got a little over 1000 followers on instagram but the only people engaging with me are my family and bots! I built it organically too, but still no luck. Maybe now that we've talked about it, some of your Instagram luck will rub off on me and some of my Pinterest luck will rub off on you ;)"", 'emotion': [{'label': 'amusement', 'score': 0.8780251741409302}, {'label': 'joy', 'score': 0.15541817247867584}, {'label': 'optimism', 'score': 0.03522240370512009}], 'replies': []}]}]}]}, {'comment': 'Nice share and thanks for taking the time to test and share it here.\n\nPinterest ads are a total fail and not worth it. Just a bunch of karen tire kickers with no buying intent, as well as bots.\n\nAs an alternative to test you could try advertising just one small coherent niche.', 'emotion': [{'label': 'gratitude', 'score': 0.9157447218894958}, {'label': 'disapproval', 'score': 0.13363265991210938}, {'label': 'admiration', 'score': 0.10194198787212372}], 'replies': []}, {'comment': 'Greaaat heads up', 'emotion': [{'label': 'neutral', 'score': 0.9676321148872375}, {'label': 'approval', 'score': 0.010257733054459095}, {'label': 'annoyance', 'score': 0.006465486250817776}], 'replies': []}]}","I recently ran my first ever Pinterest paid ad directed towards my Redbubble page as a little experiment, to celebrate making 2 sales in January. (A big feat, for me.) Whelp, that money is completely gone now! So I figured I'd share my experience in this little experiment and open up a discussion about ways this can be done more effectively, better platforms for such things, etc etc."
|
| 3 |
+
5,12,Delivering Faster Analytics at Pinterest,https://www.reddit.com/r/dataengineering/comments/1em0a5t/delivering_faster_analytics_at_pinterest/,2024-08-07T02:18:41.313Z,0.68177557,"{'comments': [{'comment': ""Not surprised, more companies are moving to Starrocks. Having used Druid and Clickhouse for multi-petabyte deployments the product seems to cover gaps within both architectures (Druid has an extremely heavy/complex footprint with limited join capabilities and is fairly costly to run). While Clickhouse can handle multi-petabyte volumes, certain design choices architecturally prevent it from auto rebalancing data which is critical at larger scale data volumes.\n\nBased on the PR's ive seen opened up for the project it looks like enabling vector search (using HNSW) seems to be the next logical step. Adding additional geospatial functions + geo indexes for euclidean distance approximation would be awesome."", 'emotion': [{'label': 'neutral', 'score': 0.8532600998878479}, {'label': 'realization', 'score': 0.11910578608512878}, {'label': 'approval', 'score': 0.07441012561321259}], 'replies': [{'comment': 'Have you tried Pinot? What has your experience been?', 'emotion': [{'label': 'curiosity', 'score': 0.7279221415519714}, {'label': 'neutral', 'score': 0.2640495002269745}, {'label': 'confusion', 'score': 0.11738746613264084}], 'replies': [{'comment': ""I have not, but reading one of its past evaluations (Fyi Pinot's opinon which is somewhat biased but still fairly accurate based on my experience managing druid and clickhouse clusters), it provides a good breakdown of the pros and cons [https://startree.ai/blog/a-tale-of-three-real-time-olap-databases#cluster-management](https://startree.ai/blog/a-tale-of-three-real-time-olap-databases#cluster-management)\n\nEither way if I had the choice, id move everything over to starrocks at this point largely because user requirements are only getting more complex at our company and architecturally/capability wise starrocks seems to be really the only OS solution that actually has near direct compatibility with mysql protocol, materialized views and supports both real time + batch loads, upserts. There is just a lot you can enable with just those four capabilities."", 'emotion': [{'label': 'neutral', 'score': 0.8027697205543518}, {'label': 'approval', 'score': 0.15497569739818573}, {'label': 'disapproval', 'score': 0.0513937808573246}], 'replies': []}]}, {'comment': 'I know this comment is a couple of months old - π
just happened to find it while searching for something else. Anyway, weβve got a webinar this Thursday, Oct 10, with Petri Zhang from Tencent. Heβll be breaking down the latest vector search and indexing features in StarRocks. If youβre still into this topic, it could be worth a lookβheβll be sharing hands-on tips and their own use cases! registration link: [https://celerdata.wistia.com/live/events/t9ixq03w1y](https://celerdata.wistia.com/live/events/t9ixq03w1y)\n\nThanks!', 'emotion': [{'label': 'neutral', 'score': 0.8639968037605286}, {'label': 'approval', 'score': 0.13142691552639008}, {'label': 'realization', 'score': 0.035815998911857605}], 'replies': []}]}, {'comment': 'Neat!', 'emotion': [{'label': 'admiration', 'score': 0.8886129260063171}, {'label': 'neutral', 'score': 0.044132545590400696}, {'label': 'approval', 'score': 0.04274787753820419}], 'replies': []}]}",
|
| 4 |
+
4,5,Pinterest Analytics Off?,https://www.reddit.com/r/Pinterest/comments/jtg2ru/pinterest_analytics_off/,2020-11-13T12:24:51.092Z,0.6841317,"{'comments': [{'comment': 'Yes there is something wrong there this days ? Last week my posts were generating 1k+ views and now they are in 2 digits or sometimes 0 and 1 . not sure what is going on there', 'emotion': [{'label': 'confusion', 'score': 0.9300082921981812}, {'label': 'neutral', 'score': 0.09244143217802048}, {'label': 'curiosity', 'score': 0.08962388336658478}], 'replies': []}, {'comment': 'Theyβve never had good analytics!! I keep an eye on it for trends purposes but not for accuracy.\nI always check my Google Analytics for actual traffic from Pinterest', 'emotion': [{'label': 'disapproval', 'score': 0.5533506274223328}, {'label': 'neutral', 'score': 0.37050575017929077}, {'label': 'disappointment', 'score': 0.2277868539094925}], 'replies': []}, {'comment': ""Not just these days. I've experienced that for months, along with widely erroneous click data (inflating clicks several times over what GA reports, particularly for paid campaigns). Speaks volumes as to the direction of the company and made me decide not to invest my time in it anymore."", 'emotion': [{'label': 'neutral', 'score': 0.33560431003570557}, {'label': 'disapproval', 'score': 0.32233288884162903}, {'label': 'disappointment', 'score': 0.22478626668453217}], 'replies': []}, {'comment': ""Yep - best bet is to reply on your Google Analytics. Check if you're still getting traffic on your GA dash. That's all that matters !"", 'emotion': [{'label': 'neutral', 'score': 0.6114410758018494}, {'label': 'approval', 'score': 0.5259392261505127}, {'label': 'optimism', 'score': 0.05469454452395439}], 'replies': []}]}",How accurate are Pinterest analytics?
|
| 5 |
+
4,1,Is Pinterest Analytics Not Working?,https://www.reddit.com/r/Blogging/comments/1gplajl/is_pinterest_analytics_not_working/,2024-11-12T13:57:23.636Z,0.6018307,"{'comments': [{'comment': 'I have no idea on Pinterest', 'emotion': [{'label': 'confusion', 'score': 0.8707553744316101}, {'label': 'neutral', 'score': 0.16035369038581848}, {'label': 'disapproval', 'score': 0.040737904608249664}], 'replies': [{'comment': 'Itβs okay. Thank you for your reply', 'emotion': [{'label': 'gratitude', 'score': 0.9860367178916931}, {'label': 'approval', 'score': 0.09153129160404205}, {'label': 'neutral', 'score': 0.009313703514635563}], 'replies': []}]}]}",Anyone else having issues with Pinterest analytics? Iβm seeing only 1 impression and no other data. Is anyone else experiencing the same problem?
|
| 6 |
+
3,5,Pinterest Ad Analytics Not Matching Google & Shopify Analytics,https://www.reddit.com/r/ecommerce/comments/j5664h/pinterest_ad_analytics_not_matching_google/,2020-10-04T20:41:20.898Z,0.5627595,"{'comments': [{'comment': 'Itβs probably more likely that Pinterest is over reporting link clicks. Are they unique clicks to your site or are they counting anyone who clicks on the pin a click? I know in Facebook analytics the link clicks data is always 2-3x more than actually click through to the site.\n\nAlso .10 per click sounds INSANELY low. So probably on the Pinterest end', 'emotion': [{'label': 'curiosity', 'score': 0.4450090825557709}, {'label': 'neutral', 'score': 0.43090108036994934}, {'label': 'confusion', 'score': 0.4084008038043976}], 'replies': []}]}","Hi all, I recently started advertising on Pinterest and for the first 3-4 days, things were great. I was getting 150-200 link clicks/day at around $.10/click. My Shopify analytics and Google Analytics supported those link clinks (though they were off a bit, but from what I've read, this isn't out of the ordinary, by about 10%-20%)."
|
| 7 |
+
3,1,Pinterest Analytics,https://www.reddit.com/r/Pinterest/comments/rwit49/pinterest_analytics/,2022-01-05T09:20:58.211Z,0.71193755,"{'comments': [{'comment': 'It depends on what your company does - and what your main goes is with using Pinterest marketing. For example, if your company sells a product and you are looking to get more people to navigate over to your website as well as make more sales, you want to pay attention to = pin clicks, outbound clicks, and saves. This shows you how your pins are grabbing the attention of potential customers and can help you better understand what your ideal audience is resonating with.', 'emotion': [{'label': 'neutral', 'score': 0.8165169954299927}, {'label': 'approval', 'score': 0.0807068720459938}, {'label': 'caring', 'score': 0.07590161263942719}], 'replies': [{'comment': 'Interesting ! i do that but i need to know one thing : to get more people into my business should i post more or there is tips for that ?or is it just a matter of time ?', 'emotion': [{'label': 'curiosity', 'score': 0.779818058013916}, {'label': 'confusion', 'score': 0.15913064777851105}, {'label': 'neutral', 'score': 0.13351574540138245}], 'replies': [{'comment': 'Do you use SEO with your post/pins? Posting βmoreβ wonβt necessarily do much unless you are using proper SEO practices. I have a blog with some really helpful Pinterest SEO tips if you wanna check it out β> www.righthandva.com/blog. Along with that, Pinterest is also a βslow burnβ when it comes to marketing, it takes a good 3 - 6 months to see real progress, but the great thing about it is once you have a good strategy set and in practice, your efforts will last and continue to give you traffic to your website. Just takes a little planning and patience.', 'emotion': [{'label': 'approval', 'score': 0.46246224641799927}, {'label': 'curiosity', 'score': 0.3009127676486969}, {'label': 'admiration', 'score': 0.24254603683948517}], 'replies': []}]}]}]}","Hi, I have a company and we are very active across social media and have recently started posting more on Pinterest. I am looking to take data from my posts / pins to see how we can improve. At the moment, I am struggling to navigate the 'analytics' section as the data is hard to interpret. Does anybody have any recommendations of ways to best use the data? Thanks!"
|
| 8 |
+
2,2,idk where my Pinterest analytics are coming from,https://www.reddit.com/r/marketing/comments/1840ciu/idk_where_my_pinterest_analytics_are_coming_from/,2023-11-26T02:30:45.262Z,0.63925713,"{'comments': [{'comment': ""If this post doesn't follow the rules [report it to the mods](https://www.reddit.com/r/marketing/about/rules/). Join our [community Discord!](https://discord.gg/looking-for-marketing-discussion-811236647760298024)\n\n\n*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/marketing) if you have any questions or concerns.*"", 'emotion': [{'label': 'neutral', 'score': 0.834263026714325}, {'label': 'approval', 'score': 0.07036291807889938}, {'label': 'curiosity', 'score': 0.037974774837493896}], 'replies': []}]}",they need to change it to where you can actually tell if your own views are being counted or if its other users
|
| 9 |
+
12,6,Is anyone else losing Pinterest analytics data for some days?,https://www.reddit.com/r/Pinterest/comments/1fikpok/is_anyone_else_losing_pinterest_analytics_data/,2024-09-17T00:22:40.748Z,0.54786026,"{'comments': [{'comment': 'Yes', 'emotion': [{'label': 'neutral', 'score': 0.5704398155212402}, {'label': 'approval', 'score': 0.41248318552970886}, {'label': 'realization', 'score': 0.01154153048992157}], 'replies': []}, {'comment': 'Yes. August 20 and 21 for food blog. All zero.', 'emotion': [{'label': 'neutral', 'score': 0.8022492527961731}, {'label': 'approval', 'score': 0.14514003694057465}, {'label': 'realization', 'score': 0.01802961155772209}], 'replies': [{'comment': 'It seems to have recovered for me - for both July and August - looks like they fixed the bug. Did it recover for you too?', 'emotion': [{'label': 'curiosity', 'score': 0.6181213855743408}, {'label': 'neutral', 'score': 0.36370643973350525}, {'label': 'confusion', 'score': 0.19176369905471802}], 'replies': [{'comment': ""If you've encountered a bug or glitch while using the app or website, try the following troubleshooting steps\n\n\n**For the website:**\n\nClear your browser's cache and cookies\n\nMake sure your browser is up to date.\n\nTry from a different browser\n\nDisable any browser extensions.\n\nOpen Pinterest in private/incognito mode (Chrome/Firefox/Safari) \n\nIf none of these steps helped, please submit a ticket to our support team [here](https://help.pinterest.com/en/contact)\n\n\n**For the app:**\n\n Turn your device off/on.\n\n Uninstall and reinstall the app\n\n Update to the latest Android or iOS version\n\n Try switching from data to Wifi or vice versa.\n\n\n If none of these steps helped, please submit a ticket to our support team [here](https://help.pinterest.com/en/contact)\n\n\n*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Pinterest) if you have any questions or concerns.*"", 'emotion': [{'label': 'neutral', 'score': 0.9317011833190918}, {'label': 'approval', 'score': 0.032884493470191956}, {'label': 'caring', 'score': 0.02448859252035618}], 'replies': []}, {'comment': 'Yeah,', 'emotion': [{'label': 'neutral', 'score': 0.5513370633125305}, {'label': 'approval', 'score': 0.45691755414009094}, {'label': 'realization', 'score': 0.02201199159026146}], 'replies': []}]}]}, {'comment': ""Edited: Yup. I work for a men's fashion website. Pinterest is our top traffic source (organic) for social media and with what's happening with AI - it's killing website traffic. We used to get 80-100k visits a week. Now, we're projected to hit 80k a month. Even I can attest to visiting websites nowadays. I'm spending more time on social media like IG watching reels versus visiting websites for info."", 'emotion': [{'label': 'neutral', 'score': 0.4713917076587677}, {'label': 'disappointment', 'score': 0.3516441583633423}, {'label': 'approval', 'score': 0.09105920791625977}], 'replies': [{'comment': 'Oh, is it a product website or a blog ? I have seen some accounts with products gain more traffic recently.', 'emotion': [{'label': 'curiosity', 'score': 0.6066533923149109}, {'label': 'confusion', 'score': 0.24293635785579681}, {'label': 'neutral', 'score': 0.1806461662054062}], 'replies': [{'comment': ""Yeah. Free website. Actually I'm working on something and we gained 4,000 more traffic compared to last week. I'm using the Tailwind app which is recommended for Pinterest."", 'emotion': [{'label': 'approval', 'score': 0.5087450742721558}, {'label': 'neutral', 'score': 0.3149106204509735}, {'label': 'excitement', 'score': 0.07200954854488373}], 'replies': []}]}]}, {'comment': 'Mine are gone from July 26-August 19', 'emotion': [{'label': 'neutral', 'score': 0.9508913159370422}, {'label': 'realization', 'score': 0.02002480812370777}, {'label': 'approval', 'score': 0.01325581781566143}], 'replies': [{'comment': 'Same, I posted a question about this yesterday. Hopefully they fix the bug soon.', 'emotion': [{'label': 'optimism', 'score': 0.9366984963417053}, {'label': 'desire', 'score': 0.05933845415711403}, {'label': 'neutral', 'score': 0.053547635674476624}], 'replies': [{'comment': ""If you've encountered a bug or glitch while using the app or website, try the following troubleshooting steps\n\n\n**For the website:**\n\nClear your browser's cache and cookies\n\nMake sure your browser is up to date.\n\nTry from a different browser\n\nDisable any browser extensions.\n\nOpen Pinterest in private/incognito mode (Chrome/Firefox/Safari) \n\nIf none of these steps helped, please submit a ticket to our support team [here](https://help.pinterest.com/en/contact)\n\n\n**For the app:**\n\n Turn your device off/on.\n\n Uninstall and reinstall the app\n\n Update to the latest Android or iOS version\n\n Try switching from data to Wifi or vice versa.\n\n\n If none of these steps helped, please submit a ticket to our support team [here](https://help.pinterest.com/en/contact)\n\n\n*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Pinterest) if you have any questions or concerns.*"", 'emotion': [{'label': 'neutral', 'score': 0.9317011833190918}, {'label': 'approval', 'score': 0.032884493470191956}, {'label': 'caring', 'score': 0.02448859252035618}], 'replies': []}]}]}]}",Hi! A few days ago - all data of metrics were lost for the dates 20th and 21st August suddenly and now when I checked - the data is gone from 22nd to 25th July as well. All the metrics from those days are now zero.
|
| 10 |
+
0,9,Pinterest Data Analysis: An Inside Look,https://www.reddit.com/r/programming/comments/psd63/pinterest_data_analysis_an_inside_look/,2012-02-16T15:14:57.195Z,0.71148753,{'comments': []},
|
| 11 |
+
0,2,Pinterest Analytics - Impressions vs Monthly views not matching?,https://www.reddit.com/r/Pinterest/comments/12x8zor/pinterest_analytics_impressions_vs_monthly_views/,2023-04-24T08:47:34.957Z,0.561777,{'comments': []},"Sorry if this has been asked before, but Pinterest's documentation is quite useless to date."
|
| 12 |
+
0,2,"How exactly do Pinterest analytics work? Do impressions, pin clicks, etc. reset to zero at certain points?",https://www.reddit.com/r/Pinterest/comments/1bmo7h6/how_exactly_do_pinterest_analytics_work_do/,2024-03-24T16:02:48.205Z,0.5539427,{'comments': []},"About a month ago I was looking at my ""Top Pins"" on the dashboard. One day my pins had 20ish impressions, next day they all said 0. They started collecting impression, etx. as usual, but seemed to all start from 0 and not pick up from the old stats."
|
| 13 |
+
0,1,"Data Analyst II, Business Operations - Monetization in Pinterest (Remote job) in πΊπΈ",https://www.reddit.com/r/likeremote/comments/17yyrkn/data_analyst_ii_business_operations_monetization/,2023-11-19T14:48:20.679Z,0.63699234,{'comments': []},Remote job in πΊπΈ United States
|
| 14 |
+
0,1,π’ Pinterest is hiring a Lead Data Analyst!,https://www.reddit.com/r/jobboardsearch/comments/1f4h5ks/pinterest_is_hiring_a_lead_data_analyst/,2024-08-29T23:46:11.521Z,0.5968413,{'comments': []},Company: Pinterest
|
| 15 |
+
0,1,Pinterest Analytics Acting Up Today? Showing Only 1 Impression Despite Multiple Clicks,https://www.reddit.com/r/Pinterest/comments/1gpejc2/pinterest_analytics_acting_up_today_showing_only/,2024-11-12T06:27:14.254Z,0.56086266,{'comments': []},"Is anyone else having issues with Pinterest Analytics today? I'm seeing impressions and clicks on my pins, but the analytics dashboard is only showing 1 impression. Last night, it was displaying all the correct data. Is there an update happening, or is it just me?"
|
| 16 |
+
56,1.3K,Using Pinterest to Help Find Your Style (or: how to tell Pinterest it is no longer 2012),https://www.reddit.com/r/femalefashionadvice/comments/lb5mkb/using_pinterest_to_help_find_your_style_or_how_to/,2021-02-02T20:31:50.507Z,0.54841655,"{'comments': [{'comment': 'Damn girl whatβs the name of this college course', 'emotion': [{'label': 'curiosity', 'score': 0.45993146300315857}, {'label': 'neutral', 'score': 0.20501013100147247}, {'label': 'annoyance', 'score': 0.17439810931682587}], 'replies': [{'comment': 'It\'s called ""how to avoid making mistakes in the form of impulse purchases 101"" which is a prerequisite for ""it\'s okay if fashion is your hobby and not your reality"". I\'ve gotten straight C\'s', 'emotion': [{'label': 'neutral', 'score': 0.7032130360603333}, {'label': 'approval', 'score': 0.288017600774765}, {'label': 'realization', 'score': 0.06740318983793259}], 'replies': [{'comment': 'This made me snort. I too have barely passed these courses. There needs to be a fashion rehab sub, like the makeup rehab one, where people encourage each other to NOT buy fashion related stuff.', 'emotion': [{'label': 'neutral', 'score': 0.48968130350112915}, {'label': 'disappointment', 'score': 0.1285877823829651}, {'label': 'annoyance', 'score': 0.11151483654975891}], 'replies': [{'comment': 'r/nobuy ?', 'emotion': [{'label': 'neutral', 'score': 0.8634350299835205}, {'label': 'confusion', 'score': 0.16116750240325928}, {'label': 'curiosity', 'score': 0.11685266345739365}], 'replies': []}]}, {'comment': 'Oh gosh. Iβm not sure id even pass the admissions exam', 'emotion': [{'label': 'confusion', 'score': 0.9200900197029114}, {'label': 'disappointment', 'score': 0.0701047033071518}, {'label': 'realization', 'score': 0.06844064593315125}], 'replies': []}]}]}, {'comment': 'This sort of goes along with what you said about searching by style icon or person, but I also try to identify some influencers/stylists on Pinterest that mirror my body type even if Iβm not into their style simply to pay attention to the proportions they use and the silhouettes that flatter them. Iβve too often fallen into the trap of an outfit or piece that I love when I see it but just really doesnβt work on my body type.', 'emotion': [{'label': 'love', 'score': 0.5963670611381531}, {'label': 'approval', 'score': 0.2897084951400757}, {'label': 'neutral', 'score': 0.1623355746269226}], 'replies': [{'comment': 'Thereβs also the (related) classic trap of βdoes it actually look good or is she just skinny?β, which I am 100% guilty of falling for.', 'emotion': [{'label': 'remorse', 'score': 0.4677395820617676}, {'label': 'embarrassment', 'score': 0.08512023836374283}, {'label': 'sadness', 'score': 0.08333016186952591}], 'replies': [{'comment': 'Omg this. I have to remind myself of the shapes that look good on me (high-waisted, fitted, ample support) vs. the shapes that look good on skinny girls (boxy, low-rise, IBTC-tops)', 'emotion': [{'label': 'realization', 'score': 0.26061367988586426}, {'label': 'surprise', 'score': 0.23883803188800812}, {'label': 'neutral', 'score': 0.2152642011642456}], 'replies': [{'comment': 'This feeds into the other issue of does it look good in real life or just in pictures/at certain angles? With good posing, lighting, and setup things look amazing in photos that would never look good in real life on any body or which would communicate an entirely different style or intention if worn in real life.', 'emotion': [{'label': 'admiration', 'score': 0.7359086275100708}, {'label': 'curiosity', 'score': 0.26265138387680054}, {'label': 'confusion', 'score': 0.21551591157913208}], 'replies': []}, {'comment': '> IBTC\n\n\n?', 'emotion': [{'label': 'neutral', 'score': 0.8680164217948914}, {'label': 'curiosity', 'score': 0.1290053129196167}, {'label': 'confusion', 'score': 0.11850407719612122}], 'replies': []}]}, {'comment': 'or, relatedly, does this summer outfit look good or is she just really tan', 'emotion': [{'label': 'confusion', 'score': 0.6711305975914001}, {'label': 'curiosity', 'score': 0.43749144673347473}, {'label': 'neutral', 'score': 0.22203484177589417}], 'replies': []}]}]}, {'comment': 'I also think something that really helps me is when I find something I like, I scroll down to look at the βsimilar itemsβ. The algorithm often does a really good job at finding similar items, and then if you interact with those items it makes your home feed even better.', 'emotion': [{'label': 'approval', 'score': 0.574859619140625}, {'label': 'admiration', 'score': 0.2726016938686371}, {'label': 'neutral', 'score': 0.11154050379991531}], 'replies': []}, {'comment': 'i really appreciate this because i keep seeing awesome pinterest boards but i still associate pinterest with βlife hack! apply apple cider vinegar and baking soda right to your face!β ......which destroyed an entire generationβs moisture barrier', 'emotion': [{'label': 'admiration', 'score': 0.8437656164169312}, {'label': 'approval', 'score': 0.07931254804134369}, {'label': 'neutral', 'score': 0.07514943182468414}], 'replies': [{'comment': 'Pinterest will occasionally throw weird life hacks at you, even with all the pinterest tricks in the world', 'emotion': [{'label': 'neutral', 'score': 0.6911603808403015}, {'label': 'annoyance', 'score': 0.3233552575111389}, {'label': 'disgust', 'score': 0.054644856601953506}], 'replies': []}]}, {'comment': 'This is really great! Sometime I feel like the fashion on Pinterest is best described as βskinny thighsβ', 'emotion': [{'label': 'admiration', 'score': 0.9191799163818359}, {'label': 'approval', 'score': 0.08131308108568192}, {'label': 'neutral', 'score': 0.022006386891007423}], 'replies': [{'comment': 'Yeah, pinterest was responsible for my early-mid 2000s ""thigh gap"" obsession. I recently got back into pinterest and basically just searched ""Florence Pugh style"" to fix my algorithm. We have similar body types - small, but with substance, and big butts. I needed to see a body like mine. But every so often my feed will fill up with thin French waifs and I have to fix it again.', 'emotion': [{'label': 'neutral', 'score': 0.708404004573822}, {'label': 'approval', 'score': 0.2913823127746582}, {'label': 'realization', 'score': 0.04895747825503349}], 'replies': []}]}, {'comment': 'The more you use it and pin stuff, the better it gets at knowing what you want to see. Iβm an active user and have been since like 2012. Here is a link to my board which I think is pretty up to date fashion wise. \n\n[jewelry n fashion](https://pin.it/6qbyy4e)', 'emotion': [{'label': 'approval', 'score': 0.5130525231361389}, {'label': 'admiration', 'score': 0.3123663365840912}, {'label': 'neutral', 'score': 0.29573777318000793}], 'replies': []}, {'comment': 'This is helpful! I could never quite get pinterest to get on my level. I wish they would add more advanced search features.', 'emotion': [{'label': 'desire', 'score': 0.8352468609809875}, {'label': 'optimism', 'score': 0.08599977940320969}, {'label': 'neutral', 'score': 0.06360447406768799}], 'replies': [{'comment': 'I find that Google search is better than almost any website\'s internal search. If you Google your search term + ""Pinterest"" and switch to the images tab, you get a lot of great results that you can pin straight to your own board.', 'emotion': [{'label': 'approval', 'score': 0.4768153727054596}, {'label': 'neutral', 'score': 0.40069329738616943}, {'label': 'admiration', 'score': 0.2567213773727417}], 'replies': [{'comment': 'I have a pinterest chrome extension for my laptop that adds a little ""pin"" button over literally every photo anywhere, and it gives a little pop-up window to pin the image when you click on it.', 'emotion': [{'label': 'neutral', 'score': 0.9483265280723572}, {'label': 'approval', 'score': 0.037410229444503784}, {'label': 'realization', 'score': 0.012202158570289612}], 'replies': []}, {'comment': ""You can actually put 'site:pinterest.com' (no quotes) and then it will only show results from whatever you put after site: :)"", 'emotion': [{'label': 'neutral', 'score': 0.9512649178504944}, {'label': 'approval', 'score': 0.038868822157382965}, {'label': 'realization', 'score': 0.008383532986044884}], 'replies': []}]}]}, {'comment': 'This is a great post! I\'ve been trying to reduce my Instagram use and lean on Pinterest more for fashion, but like you mentioned there are a lot of outdated pins and catalog photos floating around. I love the street style and follow a person tips, those two have really helped me find fun and interesting outfits. \n\nWho are some of your favorite ""icons"" to search for? I\'ve been loving Camille Charriere and Sophia Rosemary lately but would love to expand my horizons!', 'emotion': [{'label': 'love', 'score': 0.7847862243652344}, {'label': 'admiration', 'score': 0.5881052613258362}, {'label': 'curiosity', 'score': 0.22733168303966522}], 'replies': [{'comment': ""Thanks! I don't know Sophia Rosemary but if you like Camille Charriere I'd suggest Olivia Palermo, Viviana Volpicella, Susie Bubbles, and Caroline Issa"", 'emotion': [{'label': 'gratitude', 'score': 0.9753870964050293}, {'label': 'confusion', 'score': 0.027857555076479912}, {'label': 'neutral', 'score': 0.023876963183283806}], 'replies': []}]}, {'comment': 'This is really helpful, and detailed. A lot of effort went into this! I am fascinated by how clear and organised your approach is. \n\nI would use pinterest in a different manner more a style ""mood board"" than practical. \n\n\n* So I might have events or things I am desiring (like a manifestation board). I desire to perform this year for example, so I have board for dancing style inspiration and a new board for each vision\n* Then I have a board for my ""colours""; I am a Summer (cool season), so I have a board of colours and combinations that inspire me, such as baby blue and creamy white\n* I have boards with different themes, such as renaissance, vintage, exotic/seductive and in those boards I place pieces or photos that evoke those moods.', 'emotion': [{'label': 'admiration', 'score': 0.4836971163749695}, {'label': 'approval', 'score': 0.2748575806617737}, {'label': 'neutral', 'score': 0.13001377880573273}], 'replies': []}, {'comment': 'Great tips, I definitely have not been using the ""More Ideas"" button to its full potential. \n\nI\'ve been trying to pin fashion and style again, and I find I really miss the website Polyvore. I never used it, but the ease with which other people made outfits and shared them meant that there was always something new to pin. \n\nI follow a few fashion bloggers who seem to be popular, but I sometimes forget the work that goes into doing a blog post, styling things just right, taking the photos, etc. Not to mention buying the clothes! With that old Polyvore website, users were pushing out complete outfits everyday. I hope something like that comes back around again soon, because I found the flat lay design of the pins easy to identify with. With real people or models, I start to worry about whether something would work with my proportions, what kind of style tips they\'re using, etc', 'emotion': [{'label': 'disappointment', 'score': 0.6942372918128967}, {'label': 'neutral', 'score': 0.12817423045635223}, {'label': 'annoyance', 'score': 0.06950899958610535}], 'replies': []}, {'comment': ""Thank you for the in depth breakdown! I actually use Pintrest for most of my fashion finding needs and I've been in the habit of reworking my algorithm often. As soon as I start getting recommended a bunch of things I don't like I start unfollowing boards and abusing the hide button like crazy. I also went through and organized all my boards with the new subcategory option to combine a lot of my boards together. \n\nAnother note that might help people is if you can't figure out why your still getting recommended out of date pins, go back into your boards that your feed recommends from and delete the older pins that you no longer like. I went back into all my fashion boards and went to the pins I'd pinned when I first got into Pintrest (in like 2012) that were definitely no longer my style. Once those were no longer there to draw from my feed changed pretty dramatically."", 'emotion': [{'label': 'gratitude', 'score': 0.9700964093208313}, {'label': 'neutral', 'score': 0.032738711684942245}, {'label': 'approval', 'score': 0.02781965211033821}], 'replies': []}, {'comment': ""Thanks for this!\n\nHere's my [fall/winter board](https://www.pinterest.com/gardenfractals/fallwinter-fashion/) (academic) and my [spring/summer board](https://www.pinterest.com/gardenfractals/springsummer-fashion/) (bohemian/cottagecore)"", 'emotion': [{'label': 'gratitude', 'score': 0.9702953696250916}, {'label': 'neutral', 'score': 0.03544649854302406}, {'label': 'approval', 'score': 0.008915351703763008}], 'replies': [{'comment': 'I always double take when I see cottagecore being used in a non lesbian way π
. Thanks for sharing your boards.', 'emotion': [{'label': 'gratitude', 'score': 0.9906330108642578}, {'label': 'approval', 'score': 0.028467580676078796}, {'label': 'realization', 'score': 0.01988801918923855}], 'replies': []}]}, {'comment': 'This is a great post and might help me. \n\nFinding pins with actual clothing brands/items tagged or listed in the description is basically non existent in my experience. \n\nItβs great for inspiration and feeling like I understand more of what my personal style is, but actually being able to find pieces like what Iβm seeing is incredibly difficult. I have to rely on bad google searches for pieces Iβm interested in buying.', 'emotion': [{'label': 'admiration', 'score': 0.8037423491477966}, {'label': 'approval', 'score': 0.2792714834213257}, {'label': 'neutral', 'score': 0.0676121637225151}], 'replies': [{'comment': 'I used to be super diligent about correctly linking all of my pins from their original source but I got so fed up with the site when it just got overrun with stuff of unknown provenance off Google images. I like the concept of visual bookmarks though and I think this post definitely has some really good tips. I think I just need to refocus my usage to βinspirationβ...', 'emotion': [{'label': 'admiration', 'score': 0.5844922065734863}, {'label': 'approval', 'score': 0.525418758392334}, {'label': 'optimism', 'score': 0.07284025102853775}], 'replies': []}]}, {'comment': 'The black jacket, stiff black pants, and boots outfit on your composition board is amazing.', 'emotion': [{'label': 'admiration', 'score': 0.9353698492050171}, {'label': 'approval', 'score': 0.03268744423985481}, {'label': 'neutral', 'score': 0.02782064490020275}], 'replies': []}, {'comment': 'Yes! All of this!\n\nIβve been using some of this for a while, and have been looking for ways to go from smart casual to a more business casual, and found a new person who tends to dress in a way which fits with my established comfort zone but with more of a leaning towards where I need to go (workplace with strict dress codes for professional and hygiene reasons). I know virtually nothing about this figure as a person or platform and donβt want to name them as I donβt know how Iβd feel about them if I did. But their style? Perfect for my needs, and something I likely wouldnβt have come across otherwise.', 'emotion': [{'label': 'confusion', 'score': 0.4243490695953369}, {'label': 'approval', 'score': 0.28823524713516235}, {'label': 'neutral', 'score': 0.19186663627624512}], 'replies': []}, {'comment': 'I just want to say your style is exquisite. Iβve been looking for something to get me excited about maybe one day getting back into social life post-pandemic and I think this is it!! Thank you for the inspiration!! πππ', 'emotion': [{'label': 'gratitude', 'score': 0.8101679086685181}, {'label': 'excitement', 'score': 0.4594755172729492}, {'label': 'admiration', 'score': 0.35230815410614014}], 'replies': [{'comment': 'Aw thanks! Glad what turned out to be a getting-me-through-quarantine activity will be useful to someone else!', 'emotion': [{'label': 'gratitude', 'score': 0.9647055864334106}, {'label': 'joy', 'score': 0.1457764059305191}, {'label': 'relief', 'score': 0.02886912412941456}], 'replies': []}]}, {'comment': 'Just dropping in to tell you that I really love your style and admire how youβre so freaking organized! \nItβs more than I could ever aspire to be. \n\nYouβre totally on the money when it comes to the feed: the output you get is determined by the input the algorithm gets from you. \nItβs a learning system, and if you teach it that you like 2012 stuff the best thatβs all it ends up showing you. As with any other social (or βsocialβ) media out there your experience is determined by how you curate it.\n\nSince I like a number of things you like (proportions, textures, colors...) you might like [my boards](https://www.pinterest.de/toshikoshisoba/garΓ§onne/) since I see some overlap but not necessarily the same pins, which imho is a good thing!', 'emotion': [{'label': 'admiration', 'score': 0.7633046507835388}, {'label': 'love', 'score': 0.32573193311691284}, {'label': 'approval', 'score': 0.19910386204719543}], 'replies': []}, {'comment': 'Thank you for taking the time to explain this so thoroughly and clearly, Iβm excited to start using Pinterest for fashion again (like I did in 2012).', 'emotion': [{'label': 'gratitude', 'score': 0.7964074015617371}, {'label': 'excitement', 'score': 0.5987990498542786}, {'label': 'joy', 'score': 0.05565526336431503}], 'replies': []}, {'comment': ""I've separated out my boards with sections and it's helped a ton. My style boards are separated by season and then further by footwear or events for practicality. I've also created separate boards for specific things like travelling or work outfits but I'm thinking of merging them into my season boards. I'm able to see common themes and I can make my shopping list concise. I've done it this way because I struggle with putting an outfit together so if I group my outfits by season or topic I'm able to see everything I should include. Some of my boards: [Summer](https://www.pinterest.com/claire12841/summer/), [Spring/Fall](https://www.pinterest.com/claire12841/spring-and-fall/), [Night Out](https://www.pinterest.com/claire12841/night-out/), [Dresses](https://www.pinterest.com/claire12841/dresses/), [Work Outfits](https://www.pinterest.com/claire12841/work-outfits/), [Travel](https://www.pinterest.com/claire12841/travel/)"", 'emotion': [{'label': 'neutral', 'score': 0.5504883527755737}, {'label': 'approval', 'score': 0.5179569721221924}, {'label': 'realization', 'score': 0.07261896133422852}], 'replies': []}, {'comment': 'I shall pin this now, read later. Looks usefull.π\u200dβοΈ', 'emotion': [{'label': 'approval', 'score': 0.7775907516479492}, {'label': 'neutral', 'score': 0.14819858968257904}, {'label': 'optimism', 'score': 0.1355808824300766}], 'replies': []}, {'comment': 'omg i had no idea sub boards were a thing now, time to categorise e v e r y t h i n g', 'emotion': [{'label': 'realization', 'score': 0.5009490847587585}, {'label': 'surprise', 'score': 0.4787443280220032}, {'label': 'neutral', 'score': 0.152718186378479}], 'replies': []}, {'comment': 'Suboards?!? Um lifechanging', 'emotion': [{'label': 'curiosity', 'score': 0.5274548530578613}, {'label': 'confusion', 'score': 0.2536788582801819}, {'label': 'neutral', 'score': 0.24681603908538818}], 'replies': []}, {'comment': 'Thank you for having amazing cool style and staning the canadian tuxedo. Why wouldnt you want MORE good good denim!?!', 'emotion': [{'label': 'gratitude', 'score': 0.6951720714569092}, {'label': 'admiration', 'score': 0.5946052670478821}, {'label': 'curiosity', 'score': 0.4152924120426178}], 'replies': []}, {'comment': 'pinterest is my favourite for finding new styles iβm into', 'emotion': [{'label': 'love', 'score': 0.47943615913391113}, {'label': 'approval', 'score': 0.29627180099487305}, {'label': 'admiration', 'score': 0.11477459222078323}], 'replies': []}, {'comment': 'Thank you! I havenβt used it in years because I felt I couldnβt get it right. Time to re-download Pinterest, clear all of my boards, and start over!', 'emotion': [{'label': 'gratitude', 'score': 0.9816188216209412}, {'label': 'realization', 'score': 0.020704636350274086}, {'label': 'disapproval', 'score': 0.018521953374147415}], 'replies': []}, {'comment': 'I have a question about making the Pinterest experience better... do you know how to block things now? I used to just tap on the three dots next to an ad, and Iβd be taken to the page for that seller, where thereβd be an option to block all their pins. Now if I try to do that, I get taken to their website!', 'emotion': [{'label': 'neutral', 'score': 0.488020122051239}, {'label': 'curiosity', 'score': 0.48220300674438477}, {'label': 'confusion', 'score': 0.07596398144960403}], 'replies': []}, {'comment': 'I look for something i liked so i can save it and pinterest knows it is somerhing im interessed like a artist /character outfit or a aesthetic on the internet is easy to look up the common aesthetics and see if you are interested in any part of some', 'emotion': [{'label': 'neutral', 'score': 0.7027512788772583}, {'label': 'approval', 'score': 0.20754355192184448}, {'label': 'desire', 'score': 0.03338885307312012}], 'replies': []}, {'comment': 'This passage gave me a lot of inspiration. I often use pinterest and choose my own style from it.', 'emotion': [{'label': 'approval', 'score': 0.41848087310791016}, {'label': 'admiration', 'score': 0.288076251745224}, {'label': 'neutral', 'score': 0.21850398182868958}], 'replies': []}, {'comment': 'these are awesome tips!! i just recently started using pinterest (2 months ago or so), and i totally agree that the biggest tips are \n1) searching names of style icons/celebrities \n2) enter ""street style"" along with the term\n\ni love to also scroll down to the ""more like this"" section underneath a pin i really like. and as you said go to the ""more ideas"" section in subboards. \nmy boards are organized by vibe/style/era though. (eg: 90s, 60s/70s, art girl, french/cottage, etc) \nhere\'s my board: https://pin.it/7uFaRnq', 'emotion': [{'label': 'approval', 'score': 0.6603495478630066}, {'label': 'love', 'score': 0.3071492612361908}, {'label': 'admiration', 'score': 0.25838446617126465}], 'replies': []}, {'comment': 'These are really good points, I think I was doing some of them because I found out that Pinterest was helping me learn more about some designers and have them ""saved"" in my boards.\n\nWhat I do is I have styling boards for seasons right now they are ""autumn-winter"" and ""spring-summer"" but I\'m going to separate them because where I live summer is its own season with very extreme temperatures. I have a subcategory in the boards for colour, so I can pin outfits and inspiration which have the colours I\'m looking for even if it isn\'t necessarily the shape or garment I like.\n\nI also have another more inspirational but I don\'t use it that often, maybe for ""saving"" haute couture or really fancy designs.\n\nWhat I\'ve been doing recently is editing my boards because I found a lot of pins I don\'t like anymore. I\'m trying to improve my wardrobe and tune my style and I revisit them often, so editing makes a lot of sense for me.', 'emotion': [{'label': 'approval', 'score': 0.4170505106449127}, {'label': 'admiration', 'score': 0.30304861068725586}, {'label': 'neutral', 'score': 0.23965469002723694}], 'replies': []}, {'comment': 'Thank you', 'emotion': [{'label': 'gratitude', 'score': 0.987123966217041}, {'label': 'neutral', 'score': 0.010359980165958405}, {'label': 'approval', 'score': 0.009326127357780933}], 'replies': []}]}","Hi FFA! It is frequently acknowledged around here that Pinterest can be difficult to use for finding personal style, or that it is simply an outdated platform for doing so. However, there are definitely ways to curb some of the more dated pins and organize your saved items to cobble together a cohesive style. Here, I'd like to share some of the Pinterest approaches that have worked for me. I've shared both some tips and some examples from my own pinterest boards."
|
| 17 |
+
20,26,Is anybody successful using Pinterest as a marketing tactic as an artist?,https://www.reddit.com/r/artbusiness/comments/15fr3k6/is_anybody_successful_using_pinterest_as_a/,2023-08-01T22:35:19.900Z,0.56539327,"{'comments': [{'comment': 'One thing thatβs great about posting your content to Pinterest is that itβs evergreen. Itβs basically a visual search engine. Unlike instagram, where your content will usually only show up on a feed when newer, older posts can show up based on what someone is looking for. Your content can still gain views and clicks long after posting. I donβt exactly know how the algorithm for search results works, but itβs much less time sensitive and more keyword focused. Additionally, people are often seeking something more specific out, even if itβs just inspiration.', 'emotion': [{'label': 'approval', 'score': 0.45543891191482544}, {'label': 'confusion', 'score': 0.34738314151763916}, {'label': 'neutral', 'score': 0.16685102880001068}], 'replies': []}, {'comment': 'I have so much trouble wrapping my mind around how someone can make money from Pinterest π€£', 'emotion': [{'label': 'disappointment', 'score': 0.5205671191215515}, {'label': 'sadness', 'score': 0.21998398005962372}, {'label': 'annoyance', 'score': 0.12769770622253418}], 'replies': [{'comment': 'Itβs not so much about making money, but having leads that take potential customer to your e-commerce site.', 'emotion': [{'label': 'neutral', 'score': 0.8682621717453003}, {'label': 'approval', 'score': 0.07602718472480774}, {'label': 'disapproval', 'score': 0.056918755173683167}], 'replies': [{'comment': ""I still have trouble with this idea though because Pinterest is so hard to interact with. Half the time you see a pin and it's very difficult to figure out where the thing featured in it actually came from because someone just pinned it because they want you to follow THEM about the things they pin but not the creators of these things. But I never see anyone only pinning their OWN work?? Just confusing to me."", 'emotion': [{'label': 'confusion', 'score': 0.9064099192619324}, {'label': 'neutral', 'score': 0.15696237981319427}, {'label': 'curiosity', 'score': 0.04464132338762283}], 'replies': [{'comment': 'Plenty of people pin their own work? Pin stuff from your website or wherever you sell, also write blog articles you can pin\n\nPeople will be led to your work that way, and when itβs repinned, it will still lead to where you pinned it from. \n\nIf you find your art pinned without leading back to your site, Iβve seen people make a comment like βthank you for pinning my artβ which leads people to your profile.\n\nPinterest is a long game, you need to be consistent and persistent.', 'emotion': [{'label': 'neutral', 'score': 0.723783552646637}, {'label': 'approval', 'score': 0.15845628082752228}, {'label': 'optimism', 'score': 0.03814828395843506}], 'replies': []}, {'comment': 'Its confusing to me too. I never understood how Pinterest works and most links I click are dead and donβt work. I started to wonder if maybe I am just too old for Pinterest lol', 'emotion': [{'label': 'confusion', 'score': 0.9340522885322571}, {'label': 'amusement', 'score': 0.1895664930343628}, {'label': 'joy', 'score': 0.07185665518045425}], 'replies': []}]}]}]}, {'comment': ""It is a lot faster ranking your website on Pinterest than on Google. I repeatedly get visitors to my website from there and I didn't pay any ads. \nAs a visual poet, artist and designer, I prefer short-form content plus visual content and I find it a lot easier to create pins than long-form blog posts. I view each pin I create as an ad for a page from my website. I also noticed I get more views if I link pins to my site than to any other platform where I license what I create. \nI also use Pinterest a lot as a regular user. It's where I go to when I'm not sure what I want and what I'm searching for and I did buy things after seeing them there. I can organize pins in boards per interest and buying stage and I love how beautiful my feed is, which I can't say about other social media platforms. \nBefore Pinterest, I used to search art on Google Images."", 'emotion': [{'label': 'approval', 'score': 0.46926966309547424}, {'label': 'neutral', 'score': 0.3542890250682831}, {'label': 'realization', 'score': 0.18849776685237885}], 'replies': []}, {'comment': ""Following this as I am wondering the same! I just started out and met someone who says she neglects her Pinterest but for some reason, gets a lot of sales from there. So, I have created one and will see. I suspect it can be a big deal if you get trending interior decorators or other influencers in your niche to share your content, but that's a reach on any platform..."", 'emotion': [{'label': 'neutral', 'score': 0.2993132770061493}, {'label': 'approval', 'score': 0.12795163691043854}, {'label': 'surprise', 'score': 0.09728029370307922}], 'replies': []}, {'comment': "" In my opinion. Its algorithm focuses on content relevance rather than chronology, giving your artwork a longer shelf life. To maximize its potential, ensure that your pins and board descriptions are SEO-friendly to make it easier for people to discover your work. Also, cross-promoting your Instagram and Pinterest accounts can be beneficial. I've heard of services like Ascend Viral for Instagram growth; it might be interesting to explore similar options for Pinterest. What kind of art do you create, by the way?"", 'emotion': [{'label': 'curiosity', 'score': 0.40458232164382935}, {'label': 'approval', 'score': 0.3317425549030304}, {'label': 'neutral', 'score': 0.3025345206260681}], 'replies': []}, {'comment': 'As someone who uses Pinterest a lot Iβve bought things / found stores because of it. Iβm sure it depends on what youβre selling', 'emotion': [{'label': 'approval', 'score': 0.6437371373176575}, {'label': 'neutral', 'score': 0.34269407391548157}, {'label': 'optimism', 'score': 0.09636034816503525}], 'replies': []}, {'comment': 'They give a $100 ad credit right now. \nI ran $100 worth of ads.\nKeep in mind this is on a brand new account less than a month old, about 23 posts total. \n\nData : \n3,500 impressions\n322 engagement \n220 Engaged audience \n30 pin clicks\n2 saves\n7 outbound clicks\n0 sales\n0 followers\n0 signups ..\n\n\nIβm 90% sure youβd have better luck just paying popular pintrest accounts to pin your posts on the top of their boards.. like that actually sounds somewhat potentially profitable.', 'emotion': [{'label': 'optimism', 'score': 0.4636845588684082}, {'label': 'neutral', 'score': 0.3771691918373108}, {'label': 'approval', 'score': 0.33435267210006714}], 'replies': [{'comment': 'Super helpful! Thank you! Those are not bad stats. With some optimization you could probably break even or profit a little', 'emotion': [{'label': 'gratitude', 'score': 0.9906139373779297}, {'label': 'admiration', 'score': 0.149332195520401}, {'label': 'optimism', 'score': 0.05568382143974304}], 'replies': [{'comment': 'You think so? \nI donβt know, i only run a new shop , doesnβt look very good / havenβt got any sales or even 1 sign up so. \nProbably not me, but iβm sure someone else for sure! \nSorry i thought i added my site in the comment so you could understand more \n\nWww.wannabedeity.com \n\nBut i forsure think others could profit from it.', 'emotion': [{'label': 'remorse', 'score': 0.5150368213653564}, {'label': 'confusion', 'score': 0.30598941445350647}, {'label': 'disappointment', 'score': 0.1201181411743164}], 'replies': []}]}, {'comment': 'You donβt need βpopularβ accounts to pin your stuff, Pinterest isnβt Instagram, followers donβt matter', 'emotion': [{'label': 'neutral', 'score': 0.6036447286605835}, {'label': 'disapproval', 'score': 0.400401771068573}, {'label': 'annoyance', 'score': 0.05963178351521492}], 'replies': [{'comment': 'Okay wait, So youβre saying a post by an account with 2 million followers , will get just as many saves and clicks as an account with 10 followers? \n\nTruly i donβt know alot about Pintrest iβm not trying to be smart.', 'emotion': [{'label': 'neutral', 'score': 0.4545062482357025}, {'label': 'disapproval', 'score': 0.337257981300354}, {'label': 'confusion', 'score': 0.13485735654830933}], 'replies': []}]}]}, {'comment': 'Thank you for posting in r/ArtBusiness! Please be sure to check out the Rules in the sidebar and our [Wiki](https://www.reddit.com/r/ArtistLounge/wiki/index/) for lots of helpful answers to common questions in the FAQs. Please use the relevant stickied megathreads for request advice on pricing or to add your links to our ""share your art business"" thread so that we can all follow and support each other. If you have any questions, concerns, or feature requests please feel free to message the mods and they will help you as soon as they can. I am a bot, beep boop, if I did something wrong please report this comment.\n\n*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/artbusiness) if you have any questions or concerns.*', 'emotion': [{'label': 'gratitude', 'score': 0.9499314427375793}, {'label': 'neutral', 'score': 0.05150064453482628}, {'label': 'approval', 'score': 0.04030130058526993}], 'replies': []}, {'comment': ""Just want to note that a lot of people use Pinterest to get ideas, not shopping. Shopping is definitely a secondary use. I'd love to see the rates that viewing on Pinterest/pinning a product turns into a sale."", 'emotion': [{'label': 'love', 'score': 0.5817621946334839}, {'label': 'desire', 'score': 0.3983686566352844}, {'label': 'curiosity', 'score': 0.10488667339086533}], 'replies': []}, {'comment': ""I haven't personally taken [this](https://classes-by-a-cake-to-remember-llc.teachable.com/p/pinterest-for-product-based-businesses) class, but I'm subscribed to her channel on youtube & she's very knowledgeable about running an internet based business, so if you have a little spare $, might be worth it."", 'emotion': [{'label': 'approval', 'score': 0.41322997212409973}, {'label': 'neutral', 'score': 0.3429925739765167}, {'label': 'admiration', 'score': 0.28673726320266724}], 'replies': []}, {'comment': ""I love Pinterest π It's kind of a new Instagram nowadays π\n\nHere is my article full of utilities [How to Use Pinterest to Promote and Sell Your Art in 2023](https://www.twocatsandpossum.club/blog/how-to-use-pinterest-to-promote-and-sell-your-art-in-2023)\n\nFrom starting Business Account to Becoming a famous artist. Step by step βοΈπͺβοΈ"", 'emotion': [{'label': 'love', 'score': 0.7937862873077393}, {'label': 'neutral', 'score': 0.18600806593894958}, {'label': 'approval', 'score': 0.10541890561580658}], 'replies': []}]}",I see a lot of artists have success on Pinterest but donβt know if there are any good resources to figure out this platform? If you are having success would you be willing to share some tips?.
|
| 18 |
+
17,25,Has anyone had success on Pinterest?,https://www.reddit.com/r/socialmedia/comments/t532ey/has_anyone_had_success_on_pinterest/,2022-03-02T15:51:14.854Z,0.5621209,"{'comments': [{'comment': ""[Please keep in mind that all posts need to be of professional discussion](https://www.reddit.com/r/socialmedia/comments/ft6ghx/all_new_posts_need_a_flair_going_forward/). This isn't a help desk. [If this post doesn't follow the rules report it to the mods](https://www.reddit.com/r/socialmedia/about/rules/).\n\n\n*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/socialmedia) if you have any questions or concerns.*"", 'emotion': [{'label': 'neutral', 'score': 0.8799968957901001}, {'label': 'approval', 'score': 0.04742168262600899}, {'label': 'disapproval', 'score': 0.028701892122626305}], 'replies': []}, {'comment': ""I've seen tons of success with it. I believe the key is to keep at it. Keep pinning. And don't just pin your own stuff. Make it relevant to your audience.\n\nMany don't realize but your account can be about more than one thing, because of how Pinterest works. My personal account has more than 50k followers but while many follow for beer/alcohol, gadgets, and more, many also follow for the business/marketing/AI stuff I pin.\n\nAnd Pinterst is so unique in that posts can live on indefinitely. The life of a tweet is around 7 minutes. It's maybe a day for a post on Facebook or Instagram. On Pinterest, I have pins from nearly 10 years ago that are still driving hundreds of visitors a month. One in particular has been driving about $200 in affiliate commission a month for more than 8 years.\n\nRemember that Pinterest is a search engine and people frequently search, so you need to provide the things needed to be found. Not just good images (which they do matching based on image recognition) but good descriptions using keywords along with attractive headlines, etc.\n\nMake your account a relevant resource for more than just your own content. There's no reason to follow you on Pinterest if you just pin your own stuff. My boards are resources for all types of related content, with my own mixed in there. For instance, I have a board about Facebook marketing. In there I'll post relevant articles from numerous sources on the topic and then if I post something about such to my own website it'll be added there. We see this across other social channels too. Those that are most valuable share insight into a particular topic, no matter the source, rather than just their own stuff all the time."", 'emotion': [{'label': 'approval', 'score': 0.5392419695854187}, {'label': 'neutral', 'score': 0.4584020972251892}, {'label': 'optimism', 'score': 0.06855356693267822}], 'replies': [{'comment': "">Make your account a relevant resource for more than just your own content. There's no reason to follow you on Pinterest if you just pin your own stuff. My boards are resources for all types of related content, with my own mixed in there. For instance, I have a board about Facebook marketing. In there I'll post relevant articles from numerous sources on the topic and then if I post something about such to my own website it'll be added there. We see this across other social channels too. Those that are most valuable share insight into a particular topic, no matter the source, rather than just their own stuff all the time.\n\nI have so many boards like this that I kept hidden. I was told that I need to only show my work and promote myself (I'm an artist) but for me to make my work, I get inspirations from others and I collect those inspirations on my Pinterest board from colours to background to models and poses.\n\nI'm going to take a look at my Pinterest account again and tweak it. What you wrote makes a lot of sense and its time for me to look at my approach in a different perspective (when things are not working out as how I had expected them to be) :)"", 'emotion': [{'label': 'neutral', 'score': 0.9177772402763367}, {'label': 'approval', 'score': 0.07682263106107712}, {'label': 'realization', 'score': 0.014990408904850483}], 'replies': []}, {'comment': 'Amazing! thanks so much!!', 'emotion': [{'label': 'gratitude', 'score': 0.9788864850997925}, {'label': 'admiration', 'score': 0.5148550868034363}, {'label': 'approval', 'score': 0.013149995356798172}], 'replies': []}]}, {'comment': 'Pinterest is a unique angle. Its verrry viral. The trick is to just keep at it. But remember your audience is a slice of the pie. Depending o your product or service it may be more benificial to take another route.', 'emotion': [{'label': 'neutral', 'score': 0.5833783745765686}, {'label': 'approval', 'score': 0.41015058755874634}, {'label': 'admiration', 'score': 0.06743545830249786}], 'replies': []}, {'comment': 'The two things I think you have to set up there are:\n\nJoining group boards and \n\nUsing tailwind communities.\n\nThis is what helped us start getting engagement there.', 'emotion': [{'label': 'neutral', 'score': 0.5847877264022827}, {'label': 'approval', 'score': 0.36319470405578613}, {'label': 'realization', 'score': 0.11085754632949829}], 'replies': [{'comment': 'Sorry to ask but what are tailwind communities?', 'emotion': [{'label': 'remorse', 'score': 0.5911681652069092}, {'label': 'curiosity', 'score': 0.5047710537910461}, {'label': 'sadness', 'score': 0.14827926456928253}], 'replies': [{'comment': ""I'm still waiting for this answer"", 'emotion': [{'label': 'neutral', 'score': 0.5893660187721252}, {'label': 'curiosity', 'score': 0.2818947732448578}, {'label': 'confusion', 'score': 0.05709216371178627}], 'replies': []}]}]}, {'comment': 'Post frequently and use the newest possibilities. Idea Pins only π and do Takes (Answers to the Idea Pins) often. Worked for me.', 'emotion': [{'label': 'approval', 'score': 0.6767632961273193}, {'label': 'neutral', 'score': 0.36964336037635803}, {'label': 'optimism', 'score': 0.08228857815265656}], 'replies': []}, {'comment': 'Use the combination of google long tail keywords. Google crawls Pinterest. also did the same ON the Pinterest search option. Last year had one pin that grew over 2 Million and then created a steady flow of 450k views month over month.', 'emotion': [{'label': 'neutral', 'score': 0.9321812987327576}, {'label': 'approval', 'score': 0.03625575453042984}, {'label': 'realization', 'score': 0.029971498996019363}], 'replies': [{'comment': 'Can you give me a example?', 'emotion': [{'label': 'curiosity', 'score': 0.6737360954284668}, {'label': 'neutral', 'score': 0.3639681339263916}, {'label': 'confusion', 'score': 0.10497694462537766}], 'replies': [{'comment': 'If you want to search for the holidays for example with βholiday giftβ there will be other options that have longer phrases like holiday gift basket , holiday gift baskets for employees , holiday gift baskets for families etc. Although they usually donβt have to and shouldnβt be propositions. You can use this on Pinterest as keywords. Pinterest also has this same auto fill search function but you will be optimizing for Pinterest not google then.', 'emotion': [{'label': 'neutral', 'score': 0.8734796047210693}, {'label': 'disapproval', 'score': 0.08127444237470627}, {'label': 'approval', 'score': 0.03610731288790703}], 'replies': []}]}]}, {'comment': 'Remember Pinterest competes with google, but acts like a social platform.\n\nYou goal is to approach this with an SEO lensβ¦ NOT a social lens.\n\nTailwind app is a great Pinterest tool to help with bulk scheduling', 'emotion': [{'label': 'neutral', 'score': 0.7733333110809326}, {'label': 'approval', 'score': 0.15663529932498932}, {'label': 'admiration', 'score': 0.03629447892308235}], 'replies': []}, {'comment': 'Started a month ago and I have had 300 views. I posted 14 images of my personal artwork. I am not trying to sell anything. But just looking at the numbers has left me feeling very encouraged. No other social media I have tried got such a big organic reach in such a short amount of time. I think its definitely worth a try.', 'emotion': [{'label': 'approval', 'score': 0.4109642803668976}, {'label': 'admiration', 'score': 0.40600305795669556}, {'label': 'joy', 'score': 0.1389923095703125}], 'replies': []}, {'comment': 'Create a profile that looks professional\n\nUse an attractive profile image with wonderful bio\n\nCreate more boards\n\nPost daily unique content with beautiful image\n\nPin other post\n\nFollow others that relates your business or niche', 'emotion': [{'label': 'neutral', 'score': 0.6599609851837158}, {'label': 'admiration', 'score': 0.3753701150417328}, {'label': 'approval', 'score': 0.17200753092765808}], 'replies': []}, {'comment': 'I hope Iβm not too late but Pinterest is amazing! If you have som budget, run ads on Pinterest. If not remember that people on Pinterest are plank g for the future. Post consistently, and make sure edge content is optimized for Pinterest. The reps encouraged large text on photos, and short, captioned video', 'emotion': [{'label': 'admiration', 'score': 0.7949146628379822}, {'label': 'optimism', 'score': 0.7406851053237915}, {'label': 'desire', 'score': 0.12919309735298157}], 'replies': []}]}",Hey everyone!
|
| 19 |
+
16,4,Can Pinterest help generate business?,https://www.reddit.com/r/Pinterest/comments/10xkuku/can_pinterest_help_generate_business/,2023-02-09T04:04:45.592Z,0.6808174,"{'comments': [{'comment': 'as a pinterest user, if i\'m ever interested in a product i will try to click on the link attached to the pin, that (hopefully) directs me to a website where i could purchase it from, or occasionally i\'ll see people commenting asking where they can find a certain item in a pin (also be aware that pinterest\'s notification system is not great and sometimes kf you respond to them they won\'t even see it, to no fault of your own). for me personally at least, nothing has ever been ""worth my time"" enough for me to actually think of messaging someone about it or go out of my way to try and find a place to purchase it...you really do need to make things as easy as possible for potential customers, or most of them will just move on and not bother.', 'emotion': [{'label': 'optimism', 'score': 0.5767331719398499}, {'label': 'neutral', 'score': 0.2784266769886017}, {'label': 'disapproval', 'score': 0.08695880323648453}], 'replies': [{'comment': ""hello my friend, thank you for helping understanding this from a customer. Much appreciated.\n\nMy business is to business, so the busines model isn't supporting order one pc directly like Amazon. \n\nStill thank you"", 'emotion': [{'label': 'gratitude', 'score': 0.9880788922309875}, {'label': 'admiration', 'score': 0.03791024163365364}, {'label': 'approval', 'score': 0.02150440588593483}], 'replies': []}, {'comment': 'And by the way, where are you from? Pinterest is used more often in the USA. Thanks', 'emotion': [{'label': 'gratitude', 'score': 0.7821930050849915}, {'label': 'curiosity', 'score': 0.3672572374343872}, {'label': 'confusion', 'score': 0.09867436438798904}], 'replies': [{'comment': 'i live in canada :)', 'emotion': [{'label': 'neutral', 'score': 0.7927399277687073}, {'label': 'approval', 'score': 0.23126278817653656}, {'label': 'realization', 'score': 0.029041120782494545}], 'replies': [{'comment': ""Thanks for sharing. Nice to know. For those who don't lean the country culture, there is no big diffrence between the USA and Canada. hahaha"", 'emotion': [{'label': 'gratitude', 'score': 0.8420739769935608}, {'label': 'amusement', 'score': 0.7525256276130676}, {'label': 'admiration', 'score': 0.19865380227565765}], 'replies': []}]}]}, {'comment': ""After your advice, I have claimed website on my Pinterest. When people check the pins, they will see the website. [https://www.pinterest.com/Davidmepioneer/](https://www.pinterest.com/Davidmepioneer/)\n\nAnd on website, I added some pages for product detailed introduction and share the key points on the products. \n\nIf you have time, you might also have a quick look, to see if that's good designed. And of course, I don't set the E-commerce to sell, so no worries."", 'emotion': [{'label': 'neutral', 'score': 0.5811750292778015}, {'label': 'approval', 'score': 0.4040912687778473}, {'label': 'caring', 'score': 0.09958747774362564}], 'replies': []}]}, {'comment': 'Pinterest is a powerful platform for driving traffic and sales to your website or blog. \n85% of people on Pinterest make a purchase based on something they discovered while browsing. \nYou can also integrate product catalogs to make shopping seamless for Pinners.', 'emotion': [{'label': 'neutral', 'score': 0.7897077798843384}, {'label': 'approval', 'score': 0.2835122048854828}, {'label': 'admiration', 'score': 0.027384664863348007}], 'replies': [{'comment': ""thank you for your advise. Much appreciate. I will try to upload more interesting pins of my products during these days. We don't have Shopee or Amazon, so it is quite hard to let the users click and order, actually."", 'emotion': [{'label': 'gratitude', 'score': 0.9764755964279175}, {'label': 'optimism', 'score': 0.217147558927536}, {'label': 'admiration', 'score': 0.1803412288427353}], 'replies': []}]}, {'comment': '138k is a good number. Do you pin every day?', 'emotion': [{'label': 'curiosity', 'score': 0.6108508110046387}, {'label': 'admiration', 'score': 0.3092251121997833}, {'label': 'neutral', 'score': 0.10508760809898376}], 'replies': [{'comment': ""No. I don't pin every day. All of my pins are related with my LED lights. Interesting and beautiful products for catching the attentions. Acutally, my account was shut down for no reason last year for one year. When I applied, got it again.\n\nThe users more often check the old pins, even the pins from one year ago. Don't know why. Maybe because the spreading speed for new pins are slow.\n\nAnd the monthly reviews go increasing. Today it is 144.23k, 207 followers"", 'emotion': [{'label': 'confusion', 'score': 0.7077217698097229}, {'label': 'admiration', 'score': 0.18677659332752228}, {'label': 'neutral', 'score': 0.1361737698316574}], 'replies': [{'comment': 'That sounds great', 'emotion': [{'label': 'admiration', 'score': 0.9489284157752991}, {'label': 'approval', 'score': 0.035930052399635315}, {'label': 'neutral', 'score': 0.015904607251286507}], 'replies': [{'comment': 'thanks. And also welcome you to check. On my profile, has the Pinterest name. Thanks.', 'emotion': [{'label': 'gratitude', 'score': 0.9895846247673035}, {'label': 'approval', 'score': 0.01256277784705162}, {'label': 'neutral', 'score': 0.007968268357217312}], 'replies': []}]}]}]}, {'comment': '[removed]', 'emotion': [{'label': 'neutral', 'score': 0.9533737897872925}, {'label': 'sadness', 'score': 0.025761401280760765}, {'label': 'realization', 'score': 0.009556803852319717}], 'replies': [{'comment': 'thanks', 'emotion': [{'label': 'gratitude', 'score': 0.9887691736221313}, {'label': 'neutral', 'score': 0.011106301099061966}, {'label': 'approval', 'score': 0.008666799403727055}], 'replies': []}]}]}","I runned my Pinterest pins for over a year, with followers of 204 numbers; and monthly reviews of 138k. My doubt is that I don't find inquiry for wholesale or retailer. Only small group of people ask and never reply after I updated them. My question is Pinterst is only a platform for sharing? no for generating business?"
|
reddit/load_env.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from dotenv import load_dotenv
|
| 3 |
+
|
| 4 |
+
load_dotenv()
|
| 5 |
+
|
| 6 |
+
# Gemini Api keys
|
| 7 |
+
api_key = os.getenv('GEMINI_1')
|
| 8 |
+
api_key2 = os.getenv('GEMINI_2')
|
| 9 |
+
api_key3 = os.getenv('GEMINI_3')
|
| 10 |
+
api_key4 = os.getenv('GEMINI_4')
|
| 11 |
+
api_key5 = os.getenv('GEMINI_5')
|
| 12 |
+
api_key6 = os.getenv('GEMINI_6')
|
| 13 |
+
api_key7 = os.getenv('GEMINI_7')
|
| 14 |
+
api_key8 = os.getenv('GEMINI_8')
|
| 15 |
+
api_key9 = os.getenv('GEMINI_9')
|
| 16 |
+
api_key10 = os.getenv('GEMINI_10')
|
| 17 |
+
|
| 18 |
+
# Reddit credentials
|
| 19 |
+
reddit_client_id = os.getenv('REDDIT_CLIENT_ID')
|
| 20 |
+
reddit_client_secret = os.getenv('REDDIT_CLIENT_SECRET')
|
| 21 |
+
reddit_user_agent = os.getenv('REDDIT_USER_AGENT')
|
| 22 |
+
reddit_password = os.getenv('REDDIT_PASSWORD')
|
| 23 |
+
reddit_username = os.getenv('REDDIT_USERNAME')
|
{venv/reddit β reddit}/prompts.py
RENAMED
|
@@ -333,7 +333,7 @@ Competitor name from gemini are:
|
|
| 333 |
|
| 334 |
both are for the user query: "{user_query}"
|
| 335 |
|
| 336 |
-
get me 10 most relevant competitors for the given user query from both the data and return a combined list in following json format, nothing else and try not to include very general competitors into the list which are not directly related to user query, be specific according to the user query. competitor1 ,2,..10 should be the details given in the json data:
|
| 337 |
{{
|
| 338 |
list:[competitor1,competitor2,....competitor10]
|
| 339 |
}}
|
|
|
|
| 333 |
|
| 334 |
both are for the user query: "{user_query}"
|
| 335 |
|
| 336 |
+
get me 10 most relevant competitors for the given user query from both the data and return a combined list in following json format, nothing else and try not to include very general competitors into the list which are not directly related to user query, be specific according to the user query. If there is duplicate competitor names then only choose one which is best for the user query. competitor1 ,2,..10 should be the details given in the json data:
|
| 337 |
{{
|
| 338 |
list:[competitor1,competitor2,....competitor10]
|
| 339 |
}}
|
{venv/reddit β reddit}/reddit_call.py
RENAMED
|
@@ -6,10 +6,10 @@ from reddit_gemini import getKeywords
|
|
| 6 |
from reddit_search_scrapper import getCompetitorAnalysisData, getFinalData
|
| 7 |
import google.generativeai as genai
|
| 8 |
from scraping import driver, getPostComments, getSearchPostData
|
| 9 |
-
from
|
| 10 |
genai.configure(api_key=api_key)
|
| 11 |
|
| 12 |
-
user_query = "AI
|
| 13 |
|
| 14 |
def redditScrapper(user_query):
|
| 15 |
search_keywords=getKeywords(user_query=user_query)
|
|
|
|
| 6 |
from reddit_search_scrapper import getCompetitorAnalysisData, getFinalData
|
| 7 |
import google.generativeai as genai
|
| 8 |
from scraping import driver, getPostComments, getSearchPostData
|
| 9 |
+
from reddit.load_env import api_key
|
| 10 |
genai.configure(api_key=api_key)
|
| 11 |
|
| 12 |
+
user_query = "AI image"
|
| 13 |
|
| 14 |
def redditScrapper(user_query):
|
| 15 |
search_keywords=getKeywords(user_query=user_query)
|
{venv/reddit β reddit}/reddit_competitor_analysis.py
RENAMED
|
@@ -6,7 +6,7 @@ from reddit.prompts import getCompetitorPrompt, getTop10CompetitorPrompt
|
|
| 6 |
from reddit.reddit_utils import get_microseconds_list
|
| 7 |
from reddit.scraping import getPostComments, getSearchPostData
|
| 8 |
from reddit.reddit_gemini import getModelAndGenerationConfigCommon
|
| 9 |
-
from reddit.
|
| 10 |
|
| 11 |
def getCompetitorNames(user_query ): #model, generation_config
|
| 12 |
prompt=f"""Extract a list of product names, alternatives, and competitors relevant to the query: {user_query}. Ensure that the results focus on tools, platforms, or services explicitly aligned with the domain and purpose of the query. Avoid including general or loosely related products unless they directly offer features tailored to the query's intent.
|
|
@@ -46,7 +46,7 @@ return in given json format only:
|
|
| 46 |
return {"details": str(e)}
|
| 47 |
|
| 48 |
|
| 49 |
-
def getCompetitorNamesFromReddit(user_query,fileName
|
| 50 |
prompt=f"""Extract a list of product names, alternatives, and competitors relevant to the query: {user_query} from the given csv data. Ensure that the results focus on tools, platforms, or services explicitly aligned with the domain and purpose of the query and do not include very general competitors into the list which are not directly related to user query use case or intent.
|
| 51 |
|
| 52 |
Additionally, provide the platform(s) (e.g., web, apps, integrations) on which each competitor operates and categorize their functionality.Category should be string. Include a frequency count indicating the number of times each entry is mentioned or relevant to the query. Also, aggregate the total frequency of each platform across all entries. Also give provide popularity score for each competitor out of 100.
|
|
@@ -56,23 +56,19 @@ return in given json format only:
|
|
| 56 |
"competitors":[{{"name":"","platform":[],"category":"","count":number,"popularity":number}}],
|
| 57 |
"platforms":[{{"platform":name,count:number}}]
|
| 58 |
}}"""
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
]
|
| 73 |
-
)
|
| 74 |
-
else:
|
| 75 |
-
chat_session = last_chat_session
|
| 76 |
try:
|
| 77 |
response = chat_session.send_message("give your last response of competitor names")
|
| 78 |
|
|
@@ -118,7 +114,7 @@ return in given json format only:
|
|
| 118 |
|
| 119 |
def getTop10Competitors(user_query,reddit_data,gemini_data):
|
| 120 |
prompt = getTop10CompetitorPrompt(user_query=user_query,reddit_data=reddit_data,gemini_data=gemini_data)
|
| 121 |
-
model = genai.GenerativeModel("gemini-
|
| 122 |
|
| 123 |
generation_config = genai.GenerationConfig(response_mime_type="application/json")
|
| 124 |
|
|
@@ -138,7 +134,6 @@ def getPostDataofCompetitor(fileName,user_query):
|
|
| 138 |
index=getSearchPostData(forCompetitorAnalysis=True,search_keyword=f"{df.iloc[i]['name']} {df.iloc[i]['category']}",name=df.iloc[i]['name'] ,index=unique_list[i])
|
| 139 |
if index is not None:
|
| 140 |
actual_list.append(index)
|
| 141 |
-
print("actual_list",actual_list)
|
| 142 |
print("Fetched data for competitors")
|
| 143 |
fileNames = [f"posts_data_{actual_list[i]}.csv" for i in range(len(actual_list))]
|
| 144 |
return preprocessingCompetitorsData(user_query=user_query,fileNames=fileNames,fileUniqueIds=actual_list)
|
|
@@ -151,7 +146,7 @@ def preprocessingCompetitorsData(user_query,fileNames,fileUniqueIds):
|
|
| 151 |
if c==6:break
|
| 152 |
print(f"Processing file {fileNames[i]}")
|
| 153 |
# get posts comments data
|
| 154 |
-
getPostComments(
|
| 155 |
json_data = getCompetitorAnalysisReport(user_query=user_query,fileName=fileNames[i],count=c)
|
| 156 |
c+=1
|
| 157 |
# if json_data does contain "details" field, then skip this file
|
|
@@ -175,12 +170,12 @@ def preprocessingCompetitorsData(user_query,fileNames,fileUniqueIds):
|
|
| 175 |
def getCompetitorAnalysisReport(user_query,fileName,count=0):
|
| 176 |
prompt = getCompetitorPrompt(user_query=user_query)
|
| 177 |
api_key_map = {
|
| 178 |
-
0:
|
| 179 |
-
1:
|
| 180 |
-
2:
|
| 181 |
-
3:
|
| 182 |
-
4:
|
| 183 |
-
5:
|
| 184 |
}
|
| 185 |
|
| 186 |
selected_api_key = api_key_map.get(count, api_key8) # Default to api_key8 if count > 5
|
|
|
|
| 6 |
from reddit.reddit_utils import get_microseconds_list
|
| 7 |
from reddit.scraping import getPostComments, getSearchPostData
|
| 8 |
from reddit.reddit_gemini import getModelAndGenerationConfigCommon
|
| 9 |
+
from reddit.load_env import api_key5,api_key6,api_key7,api_key8,api_key9,api_key10
|
| 10 |
|
| 11 |
def getCompetitorNames(user_query ): #model, generation_config
|
| 12 |
prompt=f"""Extract a list of product names, alternatives, and competitors relevant to the query: {user_query}. Ensure that the results focus on tools, platforms, or services explicitly aligned with the domain and purpose of the query. Avoid including general or loosely related products unless they directly offer features tailored to the query's intent.
|
|
|
|
| 46 |
return {"details": str(e)}
|
| 47 |
|
| 48 |
|
| 49 |
+
def getCompetitorNamesFromReddit(user_query,fileName ): #model, generation_config
|
| 50 |
prompt=f"""Extract a list of product names, alternatives, and competitors relevant to the query: {user_query} from the given csv data. Ensure that the results focus on tools, platforms, or services explicitly aligned with the domain and purpose of the query and do not include very general competitors into the list which are not directly related to user query use case or intent.
|
| 51 |
|
| 52 |
Additionally, provide the platform(s) (e.g., web, apps, integrations) on which each competitor operates and categorize their functionality.Category should be string. Include a frequency count indicating the number of times each entry is mentioned or relevant to the query. Also, aggregate the total frequency of each platform across all entries. Also give provide popularity score for each competitor out of 100.
|
|
|
|
| 56 |
"competitors":[{{"name":"","platform":[],"category":"","count":number,"popularity":number}}],
|
| 57 |
"platforms":[{{"platform":name,count:number}}]
|
| 58 |
}}"""
|
| 59 |
+
data=getModelAndGenerationConfigCommon(fileName=fileName,isFlash=False)
|
| 60 |
+
model = data[0]
|
| 61 |
+
chat_session = model.start_chat(
|
| 62 |
+
history=[
|
| 63 |
+
{
|
| 64 |
+
"role": "user",
|
| 65 |
+
"parts": [
|
| 66 |
+
data[1],
|
| 67 |
+
prompt
|
| 68 |
+
],
|
| 69 |
+
}
|
| 70 |
+
]
|
| 71 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
try:
|
| 73 |
response = chat_session.send_message("give your last response of competitor names")
|
| 74 |
|
|
|
|
| 114 |
|
| 115 |
def getTop10Competitors(user_query,reddit_data,gemini_data):
|
| 116 |
prompt = getTop10CompetitorPrompt(user_query=user_query,reddit_data=reddit_data,gemini_data=gemini_data)
|
| 117 |
+
model = genai.GenerativeModel("gemini-1.5-pro-002")
|
| 118 |
|
| 119 |
generation_config = genai.GenerationConfig(response_mime_type="application/json")
|
| 120 |
|
|
|
|
| 134 |
index=getSearchPostData(forCompetitorAnalysis=True,search_keyword=f"{df.iloc[i]['name']} {df.iloc[i]['category']}",name=df.iloc[i]['name'] ,index=unique_list[i])
|
| 135 |
if index is not None:
|
| 136 |
actual_list.append(index)
|
|
|
|
| 137 |
print("Fetched data for competitors")
|
| 138 |
fileNames = [f"posts_data_{actual_list[i]}.csv" for i in range(len(actual_list))]
|
| 139 |
return preprocessingCompetitorsData(user_query=user_query,fileNames=fileNames,fileUniqueIds=actual_list)
|
|
|
|
| 146 |
if c==6:break
|
| 147 |
print(f"Processing file {fileNames[i]}")
|
| 148 |
# get posts comments data
|
| 149 |
+
getPostComments(file_name=fileNames[i],is_for_competitor_analysis=True)
|
| 150 |
json_data = getCompetitorAnalysisReport(user_query=user_query,fileName=fileNames[i],count=c)
|
| 151 |
c+=1
|
| 152 |
# if json_data does contain "details" field, then skip this file
|
|
|
|
| 170 |
def getCompetitorAnalysisReport(user_query,fileName,count=0):
|
| 171 |
prompt = getCompetitorPrompt(user_query=user_query)
|
| 172 |
api_key_map = {
|
| 173 |
+
0: api_key5,
|
| 174 |
+
1: api_key6,
|
| 175 |
+
2: api_key7,
|
| 176 |
+
3: api_key8,
|
| 177 |
+
4: api_key9,
|
| 178 |
+
5: api_key10
|
| 179 |
}
|
| 180 |
|
| 181 |
selected_api_key = api_key_map.get(count, api_key8) # Default to api_key8 if count > 5
|
{venv/reddit β reddit}/reddit_functions.py
RENAMED
|
@@ -3,13 +3,15 @@ from reddit.reddit_search_scrapper import getFinalData
|
|
| 3 |
from reddit.reddit_sentiment_analysis import SentimentAnalysis
|
| 4 |
from reddit.reddit_utils import get_microseconds_list
|
| 5 |
from reddit.scraping import getPostComments, getSearchPostData
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
def getRedditData(user_query, search_keywords):
|
| 9 |
unique_list = get_microseconds_list()
|
| 10 |
-
|
| 11 |
successful_steps = []
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
# Step 1: Get search post data
|
| 14 |
for i in range(len(search_keywords)):
|
| 15 |
try:
|
|
@@ -23,6 +25,7 @@ def getRedditData(user_query, search_keywords):
|
|
| 23 |
|
| 24 |
# Step 3: Get final data
|
| 25 |
try:
|
|
|
|
| 26 |
getFinalData(user_query=user_query, filesNames=fileNames)
|
| 27 |
successful_steps.append(('getFinalData',)) # Mark this step as successful
|
| 28 |
except Exception as e:
|
|
@@ -30,10 +33,17 @@ def getRedditData(user_query, search_keywords):
|
|
| 30 |
|
| 31 |
# Step 4: Get post comments
|
| 32 |
try:
|
| 33 |
-
getPostComments(
|
| 34 |
successful_steps.append(('getPostComments',)) # Mark this step as successful
|
| 35 |
except Exception as e:
|
| 36 |
print(f"Failed at getPostComments: {e}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
# Step 5: Get sentiment of post comments
|
| 38 |
try:
|
| 39 |
sentiment_instance = SentimentAnalysis()
|
|
@@ -41,9 +51,13 @@ def getRedditData(user_query, search_keywords):
|
|
| 41 |
successful_steps.append(('getPostSentiment',)) # Mark this step as successful
|
| 42 |
except Exception as e:
|
| 43 |
print(f"Failed at getPostSentiment: {e}")
|
|
|
|
|
|
|
| 44 |
# Optionally, return the successful steps for logging or further processing
|
| 45 |
return {
|
| 46 |
"fileName":fileNames[0],
|
| 47 |
-
"fileUniqueId":str(unique_list[0]),
|
| 48 |
-
"successful_steps": successful_steps
|
| 49 |
-
|
|
|
|
|
|
|
|
|
| 3 |
from reddit.reddit_sentiment_analysis import SentimentAnalysis
|
| 4 |
from reddit.reddit_utils import get_microseconds_list
|
| 5 |
from reddit.scraping import getPostComments, getSearchPostData
|
| 6 |
+
import time
|
| 7 |
|
| 8 |
+
async def getRedditData(user_query, search_keywords):
|
|
|
|
| 9 |
unique_list = get_microseconds_list()
|
|
|
|
| 10 |
successful_steps = []
|
| 11 |
|
| 12 |
+
# Record the start time
|
| 13 |
+
start_time = time.time()
|
| 14 |
+
|
| 15 |
# Step 1: Get search post data
|
| 16 |
for i in range(len(search_keywords)):
|
| 17 |
try:
|
|
|
|
| 25 |
|
| 26 |
# Step 3: Get final data
|
| 27 |
try:
|
| 28 |
+
print("fileNames", fileNames)
|
| 29 |
getFinalData(user_query=user_query, filesNames=fileNames)
|
| 30 |
successful_steps.append(('getFinalData',)) # Mark this step as successful
|
| 31 |
except Exception as e:
|
|
|
|
| 33 |
|
| 34 |
# Step 4: Get post comments
|
| 35 |
try:
|
| 36 |
+
await getPostComments(file_name=fileNames[0])
|
| 37 |
successful_steps.append(('getPostComments',)) # Mark this step as successful
|
| 38 |
except Exception as e:
|
| 39 |
print(f"Failed at getPostComments: {e}")
|
| 40 |
+
|
| 41 |
+
# Record the time just after getting post comments
|
| 42 |
+
time_after_comments = time.time()
|
| 43 |
+
elapsed_time_after_comments = time_after_comments - start_time
|
| 44 |
+
|
| 45 |
+
# Start timer for sentiment file
|
| 46 |
+
start_time = time.time()
|
| 47 |
# Step 5: Get sentiment of post comments
|
| 48 |
try:
|
| 49 |
sentiment_instance = SentimentAnalysis()
|
|
|
|
| 51 |
successful_steps.append(('getPostSentiment',)) # Mark this step as successful
|
| 52 |
except Exception as e:
|
| 53 |
print(f"Failed at getPostSentiment: {e}")
|
| 54 |
+
time_after_sentiment = time.time()
|
| 55 |
+
|
| 56 |
# Optionally, return the successful steps for logging or further processing
|
| 57 |
return {
|
| 58 |
"fileName":fileNames[0],
|
| 59 |
+
"fileUniqueId": str(unique_list[0]),
|
| 60 |
+
"successful_steps": successful_steps,
|
| 61 |
+
"reddit_data": elapsed_time_after_comments,
|
| 62 |
+
"sentiment_data": time_after_sentiment - start_time,
|
| 63 |
+
}
|
{venv/reddit β reddit}/reddit_gemini.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import json
|
| 2 |
-
import logging
|
| 3 |
import time
|
|
|
|
| 4 |
import google.generativeai as genai
|
| 5 |
|
| 6 |
from reddit.prompts import getKeywordsPrompt
|
|
@@ -14,11 +14,11 @@ def getKeywords(user_query: str):
|
|
| 14 |
try:
|
| 15 |
response = model.generate_content(prompt, generation_config=generation_config) # Adjust if the library supports async
|
| 16 |
data = response.text
|
| 17 |
-
|
| 18 |
return json.loads(data)
|
| 19 |
except Exception as e:
|
| 20 |
-
|
| 21 |
-
|
| 22 |
|
| 23 |
|
| 24 |
def upload_to_gemini(path, mime_type=None):
|
|
|
|
| 1 |
import json
|
|
|
|
| 2 |
import time
|
| 3 |
+
from fastapi import HTTPException
|
| 4 |
import google.generativeai as genai
|
| 5 |
|
| 6 |
from reddit.prompts import getKeywordsPrompt
|
|
|
|
| 14 |
try:
|
| 15 |
response = model.generate_content(prompt, generation_config=generation_config) # Adjust if the library supports async
|
| 16 |
data = response.text
|
| 17 |
+
print("keywords", data)
|
| 18 |
return json.loads(data)
|
| 19 |
except Exception as e:
|
| 20 |
+
print("Error while fetching keywords: %s", e)
|
| 21 |
+
raise HTTPException(status_code=500, detail="Error processing request")
|
| 22 |
|
| 23 |
|
| 24 |
def upload_to_gemini(path, mime_type=None):
|
{venv/reddit β reddit}/reddit_pain_point_analysis.py
RENAMED
|
@@ -1,11 +1,16 @@
|
|
| 1 |
import json
|
|
|
|
| 2 |
import google.generativeai as genai
|
| 3 |
-
|
| 4 |
from reddit.prompts import getPainPointAnalysisPrompt
|
| 5 |
from reddit.reddit_gemini import upload_to_gemini, wait_for_files_active
|
| 6 |
|
| 7 |
|
| 8 |
def pain_point_analysis(user_query,fileName,uniqueFileId):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
pain_point_prompt = getPainPointAnalysisPrompt(user_query = user_query)
|
| 10 |
generation_config = genai.GenerationConfig(response_mime_type="application/json") # Request JSON response
|
| 11 |
model = genai.GenerativeModel(
|
|
@@ -32,12 +37,15 @@ def pain_point_analysis(user_query,fileName,uniqueFileId):
|
|
| 32 |
]
|
| 33 |
response = chat_session.send_message("give your pain point analysis output json as it is.")
|
| 34 |
data = response.text
|
|
|
|
|
|
|
|
|
|
| 35 |
try:
|
| 36 |
print("pain point analysis output",data)
|
| 37 |
json_data = json.loads(data)
|
| 38 |
with open(f'pain_point_analysis_{uniqueFileId}.json', 'w') as json_file:
|
| 39 |
json.dump(json_data, json_file, indent=4)
|
| 40 |
-
return [json_data,chat_session]
|
| 41 |
except:
|
| 42 |
try:
|
| 43 |
response = chat_session.send_message("give your pain point analysis output json as it is.")
|
|
@@ -45,7 +53,7 @@ def pain_point_analysis(user_query,fileName,uniqueFileId):
|
|
| 45 |
json_data = json.loads(data)
|
| 46 |
with open(f'pain_point_analysis_{uniqueFileId}.json', 'w') as json_file:
|
| 47 |
json.dump(json_data, json_file, indent=4)
|
| 48 |
-
return [json_data,chat_session]
|
| 49 |
except:
|
| 50 |
json_data = {"details": "something went wrong"}
|
| 51 |
-
return [json_data,chat_session]
|
|
|
|
| 1 |
import json
|
| 2 |
+
import time
|
| 3 |
import google.generativeai as genai
|
| 4 |
+
from reddit.load_env import api_key2
|
| 5 |
from reddit.prompts import getPainPointAnalysisPrompt
|
| 6 |
from reddit.reddit_gemini import upload_to_gemini, wait_for_files_active
|
| 7 |
|
| 8 |
|
| 9 |
def pain_point_analysis(user_query,fileName,uniqueFileId):
|
| 10 |
+
genai.configure(api_key=api_key2)
|
| 11 |
+
|
| 12 |
+
start_time = time.time()
|
| 13 |
+
|
| 14 |
pain_point_prompt = getPainPointAnalysisPrompt(user_query = user_query)
|
| 15 |
generation_config = genai.GenerationConfig(response_mime_type="application/json") # Request JSON response
|
| 16 |
model = genai.GenerativeModel(
|
|
|
|
| 37 |
]
|
| 38 |
response = chat_session.send_message("give your pain point analysis output json as it is.")
|
| 39 |
data = response.text
|
| 40 |
+
# Record the time just after getting post comments
|
| 41 |
+
end_time = time.time()
|
| 42 |
+
elapsed_time = end_time - start_time
|
| 43 |
try:
|
| 44 |
print("pain point analysis output",data)
|
| 45 |
json_data = json.loads(data)
|
| 46 |
with open(f'pain_point_analysis_{uniqueFileId}.json', 'w') as json_file:
|
| 47 |
json.dump(json_data, json_file, indent=4)
|
| 48 |
+
return [json_data,chat_session,elapsed_time]
|
| 49 |
except:
|
| 50 |
try:
|
| 51 |
response = chat_session.send_message("give your pain point analysis output json as it is.")
|
|
|
|
| 53 |
json_data = json.loads(data)
|
| 54 |
with open(f'pain_point_analysis_{uniqueFileId}.json', 'w') as json_file:
|
| 55 |
json.dump(json_data, json_file, indent=4)
|
| 56 |
+
return [json_data,chat_session,elapsed_time]
|
| 57 |
except:
|
| 58 |
json_data = {"details": "something went wrong"}
|
| 59 |
+
return [json_data,chat_session,elapsed_time]
|
{venv/reddit β reddit}/reddit_search_scrapper.py
RENAMED
|
@@ -3,10 +3,12 @@ Reddit data pre processing code only.
|
|
| 3 |
'''
|
| 4 |
|
| 5 |
import os
|
|
|
|
| 6 |
import pandas as pd
|
| 7 |
from reddit.reddit_competitor_analysis import getCompetitorNames, getCompetitorNamesFromReddit, getPostDataofCompetitor, getTop10Competitors
|
| 8 |
from reddit.reddit_utils import topic_sort
|
| 9 |
-
|
|
|
|
| 10 |
def preProcessPostData(filesNames):
|
| 11 |
for i in filesNames:
|
| 12 |
df=pd.read_csv(i)
|
|
@@ -23,7 +25,7 @@ def preProcessPostData(filesNames):
|
|
| 23 |
def getFinalData(user_query,filesNames):
|
| 24 |
preProcessPostData(filesNames=filesNames)
|
| 25 |
# files_name=["posts_data_0.csv","posts_data_1.csv","posts_data_2.csv"]
|
| 26 |
-
final_df = topic_sort(filesNames[0], filesNames[1], filesNames[2], user_query)
|
| 27 |
for file_path in filesNames:
|
| 28 |
# Check if the file exists before attempting to delete
|
| 29 |
if os.path.exists(file_path):
|
|
@@ -36,20 +38,20 @@ def getFinalData(user_query,filesNames):
|
|
| 36 |
print("Data saved to ",filesNames[0])
|
| 37 |
|
| 38 |
|
| 39 |
-
def getCompetitorAnalysisData(user_query,fileName
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
json_data_gemini = getCompetitorNames(user_query=user_query)
|
| 41 |
-
# with open('competitors_names_gemini.json', 'w') as json_file:
|
| 42 |
-
# json.dump(json_data, json_file, indent=4)
|
| 43 |
-
json_data_reddit = getCompetitorNamesFromReddit(user_query=user_query,isSolo=isSolo,last_chat_session=chat_session,fileName=fileName)
|
| 44 |
-
# with open('competitors_names_reddit.json', 'w') as json_file:
|
| 45 |
-
# json.dump(json_data, json_file, indent=4)
|
| 46 |
data = getTop10Competitors(gemini_data=json_data_gemini,reddit_data=json_data_reddit,user_query=user_query)
|
| 47 |
df = pd.DataFrame(data["list"])
|
| 48 |
-
# print("Data saved to competitors_names.csv")
|
| 49 |
competitors_data = getPostDataofCompetitor(user_query=user_query,fileName=df)
|
|
|
|
| 50 |
|
| 51 |
return {
|
| 52 |
"competitors_data": competitors_data,
|
| 53 |
-
"all_competitor_data": data["list"]
|
|
|
|
| 54 |
}
|
| 55 |
|
|
|
|
| 3 |
'''
|
| 4 |
|
| 5 |
import os
|
| 6 |
+
import time
|
| 7 |
import pandas as pd
|
| 8 |
from reddit.reddit_competitor_analysis import getCompetitorNames, getCompetitorNamesFromReddit, getPostDataofCompetitor, getTop10Competitors
|
| 9 |
from reddit.reddit_utils import topic_sort
|
| 10 |
+
import google.generativeai as genai
|
| 11 |
+
from reddit.load_env import api_key3,api_key4
|
| 12 |
def preProcessPostData(filesNames):
|
| 13 |
for i in filesNames:
|
| 14 |
df=pd.read_csv(i)
|
|
|
|
| 25 |
def getFinalData(user_query,filesNames):
|
| 26 |
preProcessPostData(filesNames=filesNames)
|
| 27 |
# files_name=["posts_data_0.csv","posts_data_1.csv","posts_data_2.csv"]
|
| 28 |
+
final_df = topic_sort(path1=filesNames[0],path2= filesNames[1],path3= filesNames[2],query= user_query,)
|
| 29 |
for file_path in filesNames:
|
| 30 |
# Check if the file exists before attempting to delete
|
| 31 |
if os.path.exists(file_path):
|
|
|
|
| 38 |
print("Data saved to ",filesNames[0])
|
| 39 |
|
| 40 |
|
| 41 |
+
def getCompetitorAnalysisData(user_query,fileName):
|
| 42 |
+
start_time = time.time()
|
| 43 |
+
genai.configure(api_key=api_key3)
|
| 44 |
+
json_data_reddit = getCompetitorNamesFromReddit(user_query=user_query,fileName=fileName)
|
| 45 |
+
genai.configure(api_key=api_key4)
|
| 46 |
json_data_gemini = getCompetitorNames(user_query=user_query)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
data = getTop10Competitors(gemini_data=json_data_gemini,reddit_data=json_data_reddit,user_query=user_query)
|
| 48 |
df = pd.DataFrame(data["list"])
|
|
|
|
| 49 |
competitors_data = getPostDataofCompetitor(user_query=user_query,fileName=df)
|
| 50 |
+
end_time = time.time()
|
| 51 |
|
| 52 |
return {
|
| 53 |
"competitors_data": competitors_data,
|
| 54 |
+
"all_competitor_data": data["list"],
|
| 55 |
+
'e_time':end_time - start_time
|
| 56 |
}
|
| 57 |
|
{venv/reddit β reddit}/reddit_sentiment_analysis.py
RENAMED
|
@@ -29,8 +29,9 @@ class SentimentAnalysis:
|
|
| 29 |
return comment_data
|
| 30 |
def generate_sentiment_and_emotion_from_data(self,fileName):
|
| 31 |
df = pd.read_csv(fileName)
|
| 32 |
-
|
| 33 |
-
for i in range(df
|
|
|
|
| 34 |
row=df.iloc[i]
|
| 35 |
commentary=(ast.literal_eval(row['comments']))
|
| 36 |
commentary=commentary['comments']
|
|
@@ -42,10 +43,10 @@ class SentimentAnalysis:
|
|
| 42 |
"comments": comments_data
|
| 43 |
}
|
| 44 |
subset_data = df.iloc[i].copy()
|
| 45 |
-
|
| 46 |
# Modify the subset
|
| 47 |
subset_data['comments'] = json_output
|
| 48 |
-
|
| 49 |
# Assign back if needed
|
| 50 |
df.iloc[i] = subset_data
|
| 51 |
df.to_csv(fileName, index=False)
|
|
|
|
| 29 |
return comment_data
|
| 30 |
def generate_sentiment_and_emotion_from_data(self,fileName):
|
| 31 |
df = pd.read_csv(fileName)
|
| 32 |
+
|
| 33 |
+
for i in range(len(df)):
|
| 34 |
+
comments_data=[]
|
| 35 |
row=df.iloc[i]
|
| 36 |
commentary=(ast.literal_eval(row['comments']))
|
| 37 |
commentary=commentary['comments']
|
|
|
|
| 43 |
"comments": comments_data
|
| 44 |
}
|
| 45 |
subset_data = df.iloc[i].copy()
|
| 46 |
+
|
| 47 |
# Modify the subset
|
| 48 |
subset_data['comments'] = json_output
|
| 49 |
+
|
| 50 |
# Assign back if needed
|
| 51 |
df.iloc[i] = subset_data
|
| 52 |
df.to_csv(fileName, index=False)
|
{venv/reddit β reddit}/reddit_utils.py
RENAMED
|
@@ -36,3 +36,7 @@ def topic_sort(path1,query, path2='', path3='',isForCompetitorAnalysis=False):
|
|
| 36 |
df = df.reset_index(drop=True)
|
| 37 |
df = df.head(18)
|
| 38 |
return df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
df = df.reset_index(drop=True)
|
| 37 |
df = df.head(18)
|
| 38 |
return df
|
| 39 |
+
|
| 40 |
+
services_names= ['Pain point analysis','Competitor analysis']
|
| 41 |
+
|
| 42 |
+
|
{venv/reddit β reddit}/scraping.py
RENAMED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
'''
|
| 2 |
Only Scraping related code.
|
| 3 |
'''
|
|
|
|
|
|
|
| 4 |
from selenium import webdriver
|
| 5 |
from selenium.webdriver.common.action_chains import ActionChains
|
| 6 |
from selenium.webdriver.common.by import By
|
|
@@ -8,10 +10,10 @@ from selenium.webdriver.firefox.options import Options as FirefoxOptions
|
|
| 8 |
import time
|
| 9 |
from fake_headers import Headers
|
| 10 |
import pandas as pd
|
| 11 |
-
import praw
|
| 12 |
import re
|
| 13 |
-
|
| 14 |
from reddit.reddit_utils import topic_sort
|
|
|
|
| 15 |
# # Set up WebDriver
|
| 16 |
header = Headers().generate()["User-Agent"]
|
| 17 |
proxy=None
|
|
@@ -32,13 +34,6 @@ browser_option.add_argument("--headless")
|
|
| 32 |
|
| 33 |
driver = webdriver.Firefox(options=browser_option)
|
| 34 |
actions = ActionChains(driver)
|
| 35 |
-
reddit = praw.Reddit(
|
| 36 |
-
client_id="yjGfys3QZPpdCpNZl25Kig",
|
| 37 |
-
client_secret="dqoc8LrQBQhB_IgjV-lKyrD9lBPftg",
|
| 38 |
-
password="&honeyB90",
|
| 39 |
-
user_agent="Curious",
|
| 40 |
-
username="Final-Difference7055",
|
| 41 |
-
)
|
| 42 |
|
| 43 |
|
| 44 |
def extract_post_id(url):
|
|
@@ -159,65 +154,104 @@ def getSearchPostDescription(url):
|
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
-
def process_comment(comment,reply_limit):
|
| 163 |
-
|
|
|
|
|
|
|
| 164 |
comment_data = {
|
| 165 |
"user": comment.author.name if comment.author else "Unknown",
|
| 166 |
"comment": comment.body,
|
| 167 |
-
"replies": []
|
| 168 |
}
|
| 169 |
-
|
| 170 |
-
# Process replies
|
| 171 |
-
if comment.replies:
|
| 172 |
for reply in comment.replies:
|
| 173 |
-
if reply_limit==0:
|
| 174 |
break
|
| 175 |
-
reply_data = process_comment(reply,reply_limit=reply_limit-1)
|
| 176 |
comment_data["replies"].append(reply_data)
|
| 177 |
-
|
| 178 |
return comment_data
|
| 179 |
|
| 180 |
-
# 3. get post comments data
|
| 181 |
-
def getPostComments(fileName,isForCompetitorAnalysis=False):
|
| 182 |
-
data= pd.DataFrame(pd.read_csv(fileName))
|
| 183 |
-
data["comments"]=""
|
| 184 |
-
for i in range(len(data)):
|
| 185 |
-
# comment_data_sub=[]
|
| 186 |
-
try:
|
| 187 |
-
submission = reddit.submission(url=data.iloc[i]['url'])
|
| 188 |
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
-
#
|
| 197 |
-
|
|
|
|
|
|
|
|
|
|
| 198 |
comment_queue = list(submission.comments)
|
| 199 |
-
comment_count=0
|
| 200 |
-
threshold=20 if
|
|
|
|
| 201 |
while comment_queue:
|
| 202 |
-
if
|
| 203 |
break
|
| 204 |
comment = comment_queue.pop(0)
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
data = data[data['comments'] != ""]
|
| 221 |
data["descriptions"] = data["url"].apply(getSearchPostDescription)
|
| 222 |
-
|
| 223 |
-
|
|
|
|
|
|
|
|
|
| 1 |
'''
|
| 2 |
Only Scraping related code.
|
| 3 |
'''
|
| 4 |
+
import asyncio
|
| 5 |
+
import asyncpraw
|
| 6 |
from selenium import webdriver
|
| 7 |
from selenium.webdriver.common.action_chains import ActionChains
|
| 8 |
from selenium.webdriver.common.by import By
|
|
|
|
| 10 |
import time
|
| 11 |
from fake_headers import Headers
|
| 12 |
import pandas as pd
|
|
|
|
| 13 |
import re
|
| 14 |
+
from asyncpraw.models import Comment
|
| 15 |
from reddit.reddit_utils import topic_sort
|
| 16 |
+
from reddit.load_env import reddit_client_id, reddit_client_secret,reddit_password,reddit_user_agent,reddit_username
|
| 17 |
# # Set up WebDriver
|
| 18 |
header = Headers().generate()["User-Agent"]
|
| 19 |
proxy=None
|
|
|
|
| 34 |
|
| 35 |
driver = webdriver.Firefox(options=browser_option)
|
| 36 |
actions = ActionChains(driver)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
def extract_post_id(url):
|
|
|
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
+
async def process_comment(comment, reply_limit):
|
| 158 |
+
"""
|
| 159 |
+
Recursively process a comment and its replies up to the specified reply limit.
|
| 160 |
+
"""
|
| 161 |
comment_data = {
|
| 162 |
"user": comment.author.name if comment.author else "Unknown",
|
| 163 |
"comment": comment.body,
|
| 164 |
+
"replies": []
|
| 165 |
}
|
| 166 |
+
|
| 167 |
+
# Process replies if they exist
|
| 168 |
+
if hasattr(comment, "replies") and comment.replies:
|
| 169 |
for reply in comment.replies:
|
| 170 |
+
if reply_limit == 0:
|
| 171 |
break
|
| 172 |
+
reply_data = await process_comment(reply, reply_limit=reply_limit - 1)
|
| 173 |
comment_data["replies"].append(reply_data)
|
| 174 |
+
|
| 175 |
return comment_data
|
| 176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
+
async def fetch_submission_comments(url, reddit,is_for_competitor_analysis):
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
"""
|
| 182 |
+
Fetch comments from a single Reddit submission given its URL.
|
| 183 |
+
"""
|
| 184 |
+
try:
|
| 185 |
+
# Use asyncio.wait_for to add a timeout for loading the submission
|
| 186 |
+
submission = await asyncio.wait_for(reddit.submission(url=url), timeout=30)
|
| 187 |
+
|
| 188 |
+
# Load additional submission data
|
| 189 |
+
await submission.load()
|
| 190 |
|
| 191 |
+
# Expand comments up to the specified limit
|
| 192 |
+
await submission.comments.replace_more(limit=2)
|
| 193 |
+
|
| 194 |
+
# Initialize variables for comment processing
|
| 195 |
+
comments_data = []
|
| 196 |
comment_queue = list(submission.comments)
|
| 197 |
+
comment_count = 0
|
| 198 |
+
threshold = 20 if is_for_competitor_analysis else 40
|
| 199 |
+
|
| 200 |
while comment_queue:
|
| 201 |
+
if comment_count >= threshold:
|
| 202 |
break
|
| 203 |
comment = comment_queue.pop(0)
|
| 204 |
+
if isinstance(comment, Comment):
|
| 205 |
+
comment_data = await process_comment(
|
| 206 |
+
comment, reply_limit=2 if is_for_competitor_analysis else 3
|
| 207 |
+
)
|
| 208 |
+
comments_data.append(comment_data)
|
| 209 |
+
comment_count += 1
|
| 210 |
+
|
| 211 |
+
# Return processed comments
|
| 212 |
+
return {"comments": comments_data}
|
| 213 |
+
|
| 214 |
+
except asyncio.TimeoutError:
|
| 215 |
+
print(f"Skipping due to timeout: {url}")
|
| 216 |
+
except Exception as e:
|
| 217 |
+
print(f"Skipping due to error: {url} - {e}")
|
| 218 |
+
|
| 219 |
+
# Return None if an error occurs
|
| 220 |
+
return None
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
async def getPostComments(file_name, is_for_competitor_analysis=False):
|
| 224 |
+
"""
|
| 225 |
+
Fetch comments for posts listed in the CSV file and save the processed data.
|
| 226 |
+
"""
|
| 227 |
+
data = pd.DataFrame(pd.read_csv(file_name))
|
| 228 |
+
data["comments"] = ""
|
| 229 |
+
reddit = asyncpraw.Reddit(
|
| 230 |
+
client_id=reddit_client_id,
|
| 231 |
+
client_secret=reddit_client_secret,
|
| 232 |
+
password=reddit_password,
|
| 233 |
+
user_agent=reddit_user_agent,
|
| 234 |
+
username=reddit_username,
|
| 235 |
+
)
|
| 236 |
+
|
| 237 |
+
for i in range(len(data)):
|
| 238 |
+
url = data.iloc[i]['url']
|
| 239 |
+
|
| 240 |
+
# Fetch comments for the current URL
|
| 241 |
+
try:
|
| 242 |
+
comments_json = await fetch_submission_comments(url, reddit=reddit,is_for_competitor_analysis=is_for_competitor_analysis)
|
| 243 |
+
if comments_json is not None:
|
| 244 |
+
# Update the DataFrame with processed comments
|
| 245 |
+
data.at[i, 'comments'] = comments_json
|
| 246 |
+
except Exception as e:
|
| 247 |
+
print(f"Error processing {url}: {e}")
|
| 248 |
+
|
| 249 |
+
await reddit.close() # Close the Reddit instance after processing
|
| 250 |
+
|
| 251 |
+
# Remove rows with empty comments and process descriptions
|
| 252 |
data = data[data['comments'] != ""]
|
| 253 |
data["descriptions"] = data["url"].apply(getSearchPostDescription)
|
| 254 |
+
|
| 255 |
+
# Save to CSV
|
| 256 |
+
data.to_csv(file_name, index=False)
|
| 257 |
+
print(f"Comments Data saved to {file_name}")
|
requirements.txt
ADDED
|
Binary file (6.81 kB). View file
|
|
|
venv/test.py β test.py
RENAMED
|
@@ -1,15 +1,21 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
# # # Convert the 'comments' column to a list
|
| 8 |
-
# # comments_list = []
|
| 9 |
-
# # for i in df['descriptions']:
|
| 10 |
-
# # # json_data= ast.literal_eval(i)
|
| 11 |
-
# # comments_list.append(i)
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# # # print("comments_list",len())
|
| 14 |
# # # Recursive function to count non-empty replies
|
| 15 |
# # def count_non_empty_replies(comments):
|
|
@@ -193,8 +199,213 @@
|
|
| 193 |
# data.to_csv(fileName, index=False)
|
| 194 |
# print("Data saved to",fileName)
|
| 195 |
|
| 196 |
-
from reddit.reddit_competitor_analysis import getCompetitorNamesFromReddit
|
| 197 |
-
from reddit.api_keys import api_key,api_key2, api_key3
|
| 198 |
-
import google.generativeai as genai
|
| 199 |
-
genai.configure(api_key=api_key3)
|
| 200 |
-
getCompetitorNamesFromReddit(user_query='AI powered personalized skin care recommendations',isSolo=True,fileName='posts_data_1732244547776200.csv',last_chat_session=None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import asyncio
|
| 2 |
+
import asyncpraw
|
| 3 |
+
import pandas as pd
|
| 4 |
+
import json
|
| 5 |
+
import ast
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
from reddit.reddit_sentiment_analysis import SentimentAnalysis
|
| 8 |
+
from reddit.scraping import getPostComments
|
| 9 |
+
# Load the CSV file
|
| 10 |
+
# df = pd.read_csv('posts_data_1732297356855788.csv')
|
| 11 |
+
|
| 12 |
+
# # Convert the 'comments' column to a list
|
| 13 |
+
# comments_list = []
|
| 14 |
+
# for i in df['comments']:
|
| 15 |
+
# # json_data= ast.literal_eval(i)
|
| 16 |
+
# comments_list.append(i)
|
| 17 |
+
# print(comments_list[1][0:100])
|
| 18 |
+
# print(df['comments'])
|
| 19 |
# # # print("comments_list",len())
|
| 20 |
# # # Recursive function to count non-empty replies
|
| 21 |
# # def count_non_empty_replies(comments):
|
|
|
|
| 199 |
# data.to_csv(fileName, index=False)
|
| 200 |
# print("Data saved to",fileName)
|
| 201 |
|
| 202 |
+
# from reddit.reddit_competitor_analysis import getCompetitorNamesFromReddit
|
| 203 |
+
# from reddit.api_keys import api_key,api_key2, api_key3
|
| 204 |
+
# import google.generativeai as genai
|
| 205 |
+
# genai.configure(api_key=api_key3)
|
| 206 |
+
# getCompetitorNamesFromReddit(user_query='AI powered personalized skin care recommendations',isSolo=True,fileName='posts_data_1732244547776200.csv',last_chat_session=None)
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
# senti = SentimentAnalysis()
|
| 210 |
+
# senti.generate_sentiment_and_emotion_from_data(fileName='posts_data_1732297356855788.csv')
|
| 211 |
+
# import asyncio
|
| 212 |
+
|
| 213 |
+
# async def fetchComments():
|
| 214 |
+
# # async def fetchComments():
|
| 215 |
+
# await getPostComments(fileName='posts_data_1732377539625804.csv')
|
| 216 |
+
|
| 217 |
+
# # await asyncio.wait_for(asyncio.to_thread(getPostComments, fileName='posts_data_1732377539625804.csv'))
|
| 218 |
+
|
| 219 |
+
# # Run the fetchComments function
|
| 220 |
+
# if __name__ == "__main__":
|
| 221 |
+
# asyncio.run(fetchComments())
|
| 222 |
+
|
| 223 |
+
# import asyncio
|
| 224 |
+
|
| 225 |
+
# async def long_running_task():
|
| 226 |
+
# await asyncio.sleep(5) # Simulate a long-running task
|
| 227 |
+
# print("hello world")
|
| 228 |
+
|
| 229 |
+
# async def main():
|
| 230 |
+
# try:
|
| 231 |
+
# await asyncio.wait_for(long_running_task(), timeout=500) # Set timeout to 2 seconds
|
| 232 |
+
# except asyncio.TimeoutError:
|
| 233 |
+
# print("The task timed out!")
|
| 234 |
+
|
| 235 |
+
# asyncio.run(main())
|
| 236 |
+
|
| 237 |
+
# async def fetch_comments():
|
| 238 |
+
# reddit = asyncpraw.Reddit(
|
| 239 |
+
# client_id="yjGfys3QZPpdCpNZl25Kig",
|
| 240 |
+
# client_secret="dqoc8LrQBQhB_IgjV-lKyrD9lBPftg",
|
| 241 |
+
# password="&honeyB90",
|
| 242 |
+
# user_agent="Curious",
|
| 243 |
+
# username="Final-Difference7055",
|
| 244 |
+
# )
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
# subreddit = await reddit.subreddit("python")
|
| 248 |
+
|
| 249 |
+
# async for submission in subreddit.new(limit=2):
|
| 250 |
+
# print(f"Post: {submission.title}")
|
| 251 |
+
|
| 252 |
+
# # Load the submission's comments
|
| 253 |
+
# await submission.load()
|
| 254 |
+
|
| 255 |
+
# # Iterate over the comments
|
| 256 |
+
# async for comment in submission.comments:
|
| 257 |
+
# if isinstance(comment, asyncpraw.models.Comment):
|
| 258 |
+
# print(f" - {comment.body}")
|
| 259 |
+
|
| 260 |
+
# # Close the Reddit client
|
| 261 |
+
# await reddit.close()
|
| 262 |
+
|
| 263 |
+
# asyncio.run(fetch_comments())
|
| 264 |
+
|
| 265 |
+
# asyncio.run(getPostComments(file_name='posts_data_1732377539625804.csv'))
|
| 266 |
+
|
| 267 |
+
# import asyncio
|
| 268 |
+
# import heapq
|
| 269 |
+
# import time
|
| 270 |
+
# import pandas as pd
|
| 271 |
+
# import json
|
| 272 |
+
# from asyncpraw.models import Comment
|
| 273 |
+
# from threading import Lock
|
| 274 |
+
|
| 275 |
+
|
| 276 |
+
# class PriorityQueue:
|
| 277 |
+
# def __init__(self):
|
| 278 |
+
# self.heap = []
|
| 279 |
+
# self.lock = Lock()
|
| 280 |
+
|
| 281 |
+
# def push(self, priority, timestamp, query):
|
| 282 |
+
# with self.lock:
|
| 283 |
+
# heapq.heappush(self.heap, (priority, timestamp, query))
|
| 284 |
+
|
| 285 |
+
# def pop(self):
|
| 286 |
+
# with self.lock:
|
| 287 |
+
# return heapq.heappop(self.heap)
|
| 288 |
+
|
| 289 |
+
# def is_empty(self):
|
| 290 |
+
# with self.lock:
|
| 291 |
+
# return len(self.heap) == 0
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
# async def process_comment(comment, reply_limit):
|
| 295 |
+
# """
|
| 296 |
+
# Recursively process a comment and its replies up to the specified reply limit.
|
| 297 |
+
# """
|
| 298 |
+
# comment_data = {
|
| 299 |
+
# "user": comment.author.name if comment.author else "Unknown",
|
| 300 |
+
# "comment": comment.body,
|
| 301 |
+
# "replies": []
|
| 302 |
+
# }
|
| 303 |
+
|
| 304 |
+
# if hasattr(comment, "replies") and comment.replies:
|
| 305 |
+
# for reply in comment.replies:
|
| 306 |
+
# if reply_limit == 0:
|
| 307 |
+
# break
|
| 308 |
+
# reply_data = await process_comment(reply, reply_limit=reply_limit - 1)
|
| 309 |
+
# comment_data["replies"].append(reply_data)
|
| 310 |
+
|
| 311 |
+
# return comment_data
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
# async def fetch_submission(queue, reddit, data, exit_event, output_file):
|
| 315 |
+
# """
|
| 316 |
+
# Fetch Reddit submissions from the queue and process their comments.
|
| 317 |
+
# Save the output to the provided file.
|
| 318 |
+
# """
|
| 319 |
+
# while not exit_event.is_set():
|
| 320 |
+
# if not queue.is_empty():
|
| 321 |
+
# _, _, (url, index) = queue.pop()
|
| 322 |
+
# print(f"Fetching comments for: {url}")
|
| 323 |
+
|
| 324 |
+
# try:
|
| 325 |
+
# submission = await asyncio.wait_for(reddit.submission(url=url), timeout=30)
|
| 326 |
+
# await submission.comments.replace_more(limit=2)
|
| 327 |
+
# await submission.load()
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
# # Process comments
|
| 331 |
+
# comments_data = []
|
| 332 |
+
# comment_queue = list(submission.comments)
|
| 333 |
+
# comment_count = 0
|
| 334 |
+
# threshold = 40 # Set your desired threshold
|
| 335 |
+
|
| 336 |
+
# while comment_queue:
|
| 337 |
+
# if comment_count >= threshold:
|
| 338 |
+
# break
|
| 339 |
+
# comment = comment_queue.pop(0)
|
| 340 |
+
# if isinstance(comment, Comment):
|
| 341 |
+
# comment_data = await process_comment(comment, reply_limit=3)
|
| 342 |
+
# comments_data.append(comment_data)
|
| 343 |
+
# comment_count += 1
|
| 344 |
+
|
| 345 |
+
# print(f"Processed comments for: {url}")
|
| 346 |
+
# # Save comments data to the dataframe
|
| 347 |
+
# data.at[index, "comments"] = json.dumps(comments_data) # Save as JSON string
|
| 348 |
+
|
| 349 |
+
# except asyncio.TimeoutError:
|
| 350 |
+
# print(f"Timeout while processing: {url}")
|
| 351 |
+
# except Exception as e:
|
| 352 |
+
# print(f"Error processing {url}: {e}")
|
| 353 |
+
|
| 354 |
+
# # Save the data to the output file periodically
|
| 355 |
+
# data.to_csv(output_file, index=False)
|
| 356 |
+
# else:
|
| 357 |
+
# await asyncio.sleep(1)
|
| 358 |
+
|
| 359 |
+
|
| 360 |
+
# async def load_urls_to_queue(queue, file_name, data, exit_event):
|
| 361 |
+
# """
|
| 362 |
+
# Load URLs from a CSV file into the processing queue.
|
| 363 |
+
# """
|
| 364 |
+
# for index, row in data.iterrows():
|
| 365 |
+
# queue.push(0, time.time(), (row['url'], index)) # Push each URL and index into the queue
|
| 366 |
+
|
| 367 |
+
# print("All URLs loaded into the queue.")
|
| 368 |
+
# while not exit_event.is_set():
|
| 369 |
+
# await asyncio.sleep(1)
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
# async def main(input_file, output_file):
|
| 373 |
+
# reddit = asyncpraw.Reddit(
|
| 374 |
+
# client_id="yjGfys3QZPpdCpNZl25Kig",
|
| 375 |
+
# client_secret="dqoc8LrQBQhB_IgjV-lKyrD9lBPftg",
|
| 376 |
+
# password="&honeyB90",
|
| 377 |
+
# user_agent="Curious",
|
| 378 |
+
# username="Final-Difference7055",
|
| 379 |
+
# )
|
| 380 |
+
# """
|
| 381 |
+
# Main function to coordinate queue loading and submission processing.
|
| 382 |
+
# """
|
| 383 |
+
# queue = PriorityQueue()
|
| 384 |
+
# exit_event = asyncio.Event()
|
| 385 |
+
|
| 386 |
+
# # Load the input file
|
| 387 |
+
# data = pd.read_csv(input_file)
|
| 388 |
+
# data["comments"] = "" # Add a new column for storing comments
|
| 389 |
+
|
| 390 |
+
# # Start tasks
|
| 391 |
+
# loader_task = asyncio.create_task(load_urls_to_queue(queue, input_file, data, exit_event))
|
| 392 |
+
# processor_task = asyncio.create_task(fetch_submission(queue, reddit, data, exit_event, output_file))
|
| 393 |
+
|
| 394 |
+
# try:
|
| 395 |
+
# await asyncio.gather(loader_task, processor_task)
|
| 396 |
+
# except KeyboardInterrupt:
|
| 397 |
+
# print("Exiting... Setting exit event.")
|
| 398 |
+
# exit_event.set()
|
| 399 |
+
# await asyncio.gather(loader_task, processor_task)
|
| 400 |
+
|
| 401 |
+
|
| 402 |
+
# if __name__ == "__main__":
|
| 403 |
+
# import asyncpraw
|
| 404 |
+
|
| 405 |
+
|
| 406 |
+
|
| 407 |
+
# # Provide your input and output file paths
|
| 408 |
+
# input_file = "posts_data_1732377539625804.csv" # Input file with a column 'url'
|
| 409 |
+
# output_file = "output_file.csv" # Output file to save results
|
| 410 |
+
|
| 411 |
+
# asyncio.run(main(input_file, output_file))
|
user_data.csv
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
index,user_id,timeStamp,user_input,gemini_input,file_with_sentiment,pain_point_analysis,competitor_analysis
|
| 2 |
+
0.0,,2024-11-23T14:13:41.864672,"{'user_query': 'string', 'platform_names': ['string'], 'analysis_names': ['string']}",,,,
|
| 3 |
+
1.0,,,,,,,
|
| 4 |
+
2.0,,,,,,,
|
| 5 |
+
3.0,,,,,,,
|
| 6 |
+
4.0,,,,,,,
|
| 7 |
+
5.0,,,,,,,
|
| 8 |
+
6.0,,,,,,,
|
| 9 |
+
7.0,,,,,,,
|
| 10 |
+
8.0,,,,,,,
|
| 11 |
+
9.0,,,,,,,
|
| 12 |
+
10.0,,2024-11-23T15:54:57.763740,"{'user_query': 'twitter audience type', 'platform_names': ['Reddit'], 'analysis_names': ['Pain point analysis']}","{'query': 'understanding twitter audience demographics and interests', 'top_3_combinations': ['twitter audience demographics', 'twitter audience interests', 'audience demographics interests']}",,,
|
| 13 |
+
11.0,,2024-11-23T15:58:54.161820,"{'user_query': 'twitter audience type', 'platform_names': ['Reddit'], 'analysis_names': ['Pain point analysis']}","{'query': 'What are the different types of audiences on Twitter?', 'top_3_combinations': ['Twitter audience types', 'types of Twitter audience', 'audience types on Twitter']}","{'reddit_data': 140.77173471450806, 'sentiment_data': 105.14651894569397}",,
|
| 14 |
+
12.0,,,,,,,
|
| 15 |
+
13.0,,,,,,,
|
| 16 |
+
14.0,,,,,,,
|
| 17 |
+
15.0,,2024-11-24T08:52:04.143536,"{'user_query': 'What type of analysis can be done on pinterest data for business insights?', 'platform_names': ['Reddit'], 'analysis_names': ['Pain point analysis', 'Competitor analysis']}",,,,
|
| 18 |
+
16.0,,,,,,,
|
| 19 |
+
17.0,,,,,,,
|
| 20 |
+
18.0,,,,,,,
|
| 21 |
+
19.0,,2024-11-24T09:28:59.164186,"{'user_query': 'What type of analysis can be done on pinterest data for business insights?', 'platform_names': ['Reddit'], 'analysis_names': ['Pain point analysis', 'Competitor analysis']}","{'query': 'Analyzing Pinterest data for actionable business insights: methods and techniques', 'top_3_combinations': ['Pinterest data analysis', 'business insights from Pinterest', 'Pinterest analysis techniques']}","{'reddit_data': 127.50712323188782, 'sentiment_data': 23.53416347503662}",{'e_time': 64.18996047973633},"{'no_of_competitors': [{'name': 'Pinterest Analytics', 'platform': ['Web'], 'category': 'Native Analytics', 'count': 6, 'popularity': 95}, {'name': 'Tailwind', 'platform': ['Web', 'Mobile App', 'API'], 'category': 'Pinterest Marketing & Analytics', 'count': 5, 'popularity': 92}, {'name': 'Planoly', 'platform': ['Web', 'Mobile App'], 'category': 'Social Media Management & Scheduling', 'count': 4, 'popularity': 88}, {'name': 'Later', 'platform': ['Web', 'Mobile App'], 'category': 'Social Media Management & Scheduling', 'count': 4, 'popularity': 85}, {'name': 'Buffer', 'platform': ['Web', 'Mobile App'], 'category': 'Social Media Management & Scheduling', 'count': 3, 'popularity': 80}, {'name': 'SproutSocial', 'platform': ['Web', 'Mobile App'], 'category': 'Social Media Management & Analytics', 'count': 3, 'popularity': 75}, {'name': 'Google Analytics', 'platform': ['Web'], 'category': 'Web Analytics', 'count': 3, 'popularity': 95}, {'name': 'Shopify', 'platform': ['Web', 'Apps'], 'category': 'E-commerce Platform', 'count': 1, 'popularity': 90}, {'name': 'Druid', 'platform': ['Web'], 'category': 'Real-time Analytics Database', 'count': 1, 'popularity': 75}, {'name': 'ClickHouse', 'platform': ['Web'], 'category': 'Real-time Analytics Database', 'count': 1, 'popularity': 70}], 'e_time': 383.23878931999207}"
|
venv/utils.py β utils.py
RENAMED
|
File without changes
|
venv/posts_data_1732244547776200.csv
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
venv/pyvenv.cfg
CHANGED
|
@@ -2,4 +2,4 @@ home = C:\Users\HP\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.
|
|
| 2 |
include-system-site-packages = false
|
| 3 |
version = 3.11.9
|
| 4 |
executable = C:\Users\HP\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe
|
| 5 |
-
command = C:\Users\HP\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe -m venv D:\
|
|
|
|
| 2 |
include-system-site-packages = false
|
| 3 |
version = 3.11.9
|
| 4 |
executable = C:\Users\HP\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe
|
| 5 |
+
command = C:\Users\HP\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe -m venv D:\work2\nextAnalytics\venv
|
venv/reddit/api_keys.py
DELETED
|
@@ -1,13 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
from dotenv import load_dotenv
|
| 3 |
-
|
| 4 |
-
load_dotenv()
|
| 5 |
-
|
| 6 |
-
api_key = os.getenv('GEMINI_API_KEY')
|
| 7 |
-
api_key2 = os.getenv('GEMINI_SECOND_API_KEY')
|
| 8 |
-
api_key3 = os.getenv('GEMINI_THIRD_API_KEY')
|
| 9 |
-
api_key4 = os.getenv('GEMINI_FOURTH_API_KEY')
|
| 10 |
-
api_key5 = os.getenv('GEMINI_FIVE_API_KEY')
|
| 11 |
-
api_key6 = os.getenv('GEMINI_SIX_API_KEY')
|
| 12 |
-
api_key7 = os.getenv('GEMINI_SEVEN_API_KEY')
|
| 13 |
-
api_key8 = os.getenv('GEMINI_EIGHT_API_KEY')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
venv/reddit/reddit_community_post_scraper.py
DELETED
|
@@ -1,66 +0,0 @@
|
|
| 1 |
-
import praw
|
| 2 |
-
|
| 3 |
-
reddit = praw.Reddit(
|
| 4 |
-
client_id="yjGfys3QZPpdCpNZl25Kig",
|
| 5 |
-
client_secret="dqoc8LrQBQhB_IgjV-lKyrD9lBPftg",
|
| 6 |
-
password="&honeyB90",
|
| 7 |
-
user_agent="Curious",
|
| 8 |
-
username="Final-Difference7055",
|
| 9 |
-
)
|
| 10 |
-
|
| 11 |
-
subRed = reddit.subreddit("SkincareAddiction")
|
| 12 |
-
data=[]
|
| 13 |
-
for posts in subRed.hot(limit=25):
|
| 14 |
-
data.append([posts.title,posts.selftext,f"https://www.reddit.com/r/{subRed}/comments/{posts.id}"])
|
| 15 |
-
|
| 16 |
-
def process_comment(comment):
|
| 17 |
-
# Prepare the comment data
|
| 18 |
-
comment_data = {
|
| 19 |
-
"user": comment.author.name if comment.author else "Unknown",
|
| 20 |
-
"comment": comment.body,
|
| 21 |
-
"replies": [] # Initialize replies list
|
| 22 |
-
}
|
| 23 |
-
|
| 24 |
-
# Process replies recursively if any
|
| 25 |
-
if comment.replies:
|
| 26 |
-
for reply in comment.replies:
|
| 27 |
-
reply_data = process_comment(reply) # Recursive call for replies
|
| 28 |
-
comment_data["replies"].append(reply_data)
|
| 29 |
-
|
| 30 |
-
return comment_data
|
| 31 |
-
for url in range(len(data)):
|
| 32 |
-
# comment_data_sub=[]
|
| 33 |
-
submission = reddit.submission(url=data[url][2])
|
| 34 |
-
|
| 35 |
-
# Fetch and process comments
|
| 36 |
-
submission.comments.replace_more(limit=2) # Use limit=0 to get all comments
|
| 37 |
-
comments_data = []
|
| 38 |
-
|
| 39 |
-
# Function to process a comment and its replies
|
| 40 |
-
# Seed with top-level comments
|
| 41 |
-
comment_queue = list(submission.comments)
|
| 42 |
-
|
| 43 |
-
while comment_queue:
|
| 44 |
-
comment = comment_queue.pop(0)
|
| 45 |
-
comment_data = process_comment(comment) # Process each comment
|
| 46 |
-
comments_data.append(comment_data)
|
| 47 |
-
|
| 48 |
-
# Now, structure the data into the desired JSON format
|
| 49 |
-
json_output = {
|
| 50 |
-
"comments": comments_data
|
| 51 |
-
}
|
| 52 |
-
data[url].append(json_output)
|
| 53 |
-
|
| 54 |
-
new_data=[]
|
| 55 |
-
for i in range(len(data)):
|
| 56 |
-
new_data.append([data[i][0],data[i][1],data[i][3]])
|
| 57 |
-
import pandas as pd
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
# Convert the list to a DataFrame and specify column names
|
| 61 |
-
df = pd.DataFrame(new_data, columns=["Title", "Description", "Comments"])
|
| 62 |
-
|
| 63 |
-
# Save the DataFrame as a CSV file
|
| 64 |
-
df.to_csv('output.csv', index=False)
|
| 65 |
-
|
| 66 |
-
print("Data saved to output.csv")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|