28 lines
776 B
Python
28 lines
776 B
Python
from database import get_db_connection
|
|
|
|
conn = get_db_connection()
|
|
with conn.cursor() as cur:
|
|
cur.execute("""
|
|
SELECT author_display_name, rating, original_text
|
|
FROM google_review
|
|
WHERE original_text LIKE '%(Translated by Google)%'
|
|
LIMIT 5;
|
|
""")
|
|
rows = cur.fetchall()
|
|
print(f"Reviews still containing '(Translated by Google)': {len(rows)}")
|
|
for r in rows:
|
|
print(r)
|
|
|
|
cur.execute("""
|
|
SELECT author_display_name, rating, original_text
|
|
FROM google_review
|
|
WHERE original_text IS NOT NULL AND original_text != ''
|
|
ORDER BY updated_at DESC
|
|
LIMIT 5;
|
|
""")
|
|
recent = cur.fetchall()
|
|
print(f"\nRecent reviews:")
|
|
for r in recent:
|
|
print(r)
|
|
conn.close()
|