🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

superbrain-server

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superbrain-server - npm Package Compare versions

Comparing version
1.0.58
to
1.0.59
+1
-1
package.json
{
"name": "superbrain-server",
"version": "1.0.58",
"version": "1.0.59",
"description": "1-Line Auto-Installer and Server Execution wrapper for SuperBrain",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -249,4 +249,4 @@ #!/usr/bin/env python3

def get_recent(self, limit=10):
"""Return the most recently analysed posts (excludes soft-deleted)."""
def get_recent(self, limit=10000):
"""Return the most recently analysed posts (excludes soft-deleted). Optimized to exclude heavy text blobs."""
if not self.is_connected():

@@ -256,4 +256,5 @@ return []

cur = self._conn.cursor()
cols = "shortcode, url, username, content_type, analyzed_at, updated_at, post_date, likes, thumbnail, title, summary, tags, music, category, is_hidden"
cur.execute(
"SELECT * FROM analyses WHERE (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?", (limit,)
f"SELECT {cols} FROM analyses WHERE (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?", (limit,)
)

@@ -271,4 +272,5 @@ return [self._row_to_dict(r) for r in cur.fetchall()]

cur = self._conn.cursor()
cols = "shortcode, url, username, content_type, analyzed_at, updated_at, post_date, likes, thumbnail, title, summary, tags, music, category, is_hidden"
cur.execute(
"SELECT * FROM analyses WHERE category = ? AND (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?",
f"SELECT {cols} FROM analyses WHERE category = ? AND (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?",
(category, limit)

@@ -298,4 +300,5 @@ )

params = [f"%{t.lower()}%" for t in tags] + [limit]
cols = "shortcode, url, username, content_type, analyzed_at, updated_at, post_date, likes, thumbnail, title, summary, tags, music, category, is_hidden"
cur.execute(
f"SELECT * FROM analyses WHERE ({conditions}) AND (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?",
f"SELECT {cols} FROM analyses WHERE ({conditions}) AND (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?",
params

@@ -302,0 +305,0 @@ )

Sorry, the diff of this file is too big to display