refactor: update PostgreSQL import and initialization

- Changed the import statement from "bun" to "postgres".
- Simplified the PostgreSQL client initialization by directly using the connection string.
This commit is contained in:
yuanhau 2025-05-11 00:17:42 +08:00
parent 089c90f79b
commit 666f6ac38b
7 changed files with 998 additions and 211 deletions

View file

@ -10,7 +10,8 @@ headers = {
}
#url = "https://tw.news.yahoo.com/"
url = "https://news.google.com/home?hl=zh-TW&gl=TW&ceid=TW:zh-Hant"
#url = "https://news.google.com/home?hl=zh-TW&gl=TW&ceid=TW:zh-Hant"
url = "https://news.google.com/topics/CAAqJQgKIh9DQkFTRVFvSUwyMHZNRFptTXpJU0JYcG9MVlJYS0FBUAE?hl=zh-TW&gl=TW&ceid=TW%3Azh-Hant"
page = urlopen(url)
html_bytes = page.read()