Update requirements and enhance CSS styles

- Added new dependencies to requirements.txt: psycopg2-binary, pandas, and dotenv for improved functionality.
- Enhanced main.css by adding 'scroll-smooth' to the html element for better scrolling experience.
This commit is contained in:
yuanhau 2025-05-11 09:39:21 +08:00
parent 666f6ac38b
commit edf10adf5a
12 changed files with 390 additions and 678 deletions

View file

@ -1,9 +1,24 @@
# Going to love the stupid tab tab tab tab system, instead of using brances.
import time
import re # Regular expressions
from urllib.request import urlopen # URL request lib.
from bs4 import BeautifulSoup # BeautifulSoup lib.
import json
import psycopg2
import pandas as pd
import dotenv
import os
# Load environment variables from .env file
dotenv.load_dotenv()
# Connect to PostgresDB
conn = psycopg2.connect(database=os.getenv("POSTGRES_DB"),
user=os.getenv("POSTGRES_USER"),
password=os.getenv("POSTGRES_PASSWORD"),
host=os.getenv("POSTGRES_HOST"),
port=os.getenv("POSTGRES_PORT")
)
headers = {
'User-Agent': 'NewsSceraperBot/1.0 (https://github.com/hpware/news-analyze)'