(self, username, base)
| 17480 | return None |
| 17481 | |
| 17482 | def analyze_social_reddit(self, username, base): |
| 17483 | api_url = f"https://www.reddit.com/user/{urllib.parse.quote(username)}/about.json" |
| 17484 | url = f"https://www.reddit.com/user/{urllib.parse.quote(username)}" |
| 17485 | info = {"Profile": url, "Status": " Analisi Reddit"} |
| 17486 | try: |
| 17487 | r = requests.get(api_url, headers={"User-Agent":"Mozilla/5.0", "Accept":"application/json"}, timeout=10) |
| 17488 | if r.status_code == 404: |
| 17489 | info["Status"] = " Non Trovato" |
| 17490 | return [self._social_result("Reddit", username, info, base["icon"], 404, url, False)] |
| 17491 | if r.status_code in (403, 429): |
| 17492 | return [self._social_result("Reddit", username, {"Status": "Blocco temporaneo (Reddit)", "Profile": url, "Nota": f"HTTP {r.status_code}"}, base["icon"], 200, url, False)] |
| 17493 | if r.status_code != 200: |
| 17494 | return None |
| 17495 | j = self._safe_response_json(r) |
| 17496 | d = (j or {}).get("data", {}) |
| 17497 | if not d: |
| 17498 | info["Status"] = " Non Trovato" |
| 17499 | return [self._social_result("Reddit", username, info, base["icon"], 404, url, False)] |
| 17500 | |
| 17501 | info["Status"] = " Online (Reddit API)" |
| 17502 | info["Nome"] = d.get("name") or username |
| 17503 | info["Karma Totale"] = str(d.get("total_karma", 0)) |
| 17504 | info["Post Karma"] = str(d.get("link_karma", 0)) |
| 17505 | info["Comment Karma"] = str(d.get("comment_karma", 0)) |
| 17506 | info["ID Reddit"] = str(d.get("id") or "N/D") |
| 17507 | info["Is Gold"] = "Sì" if d.get("is_gold") else "No" |
| 17508 | info["Gold Expire"] = str(d.get("gold_expiration") or "N/D") |
| 17509 | info["Account Creato"] = self._crypto_ts_to_utc(d.get("created_utc")) if d.get("created_utc") else "N/D" |
| 17510 | if d.get("icon_img"): info["Avatar"] = d.get("icon_img") |
| 17511 | return [self._social_result("Reddit", username, info, d.get("icon_img") or base["icon"], 200, url, True)] |
| 17512 | except Exception: |
| 17513 | return None |
| 17514 | |
| 17515 | def analyze_social_tiktok(self, username, base): |
| 17516 | raw_user = (username or "").strip() |
nothing calls this directly
no test coverage detected