Taiwan 科技新聞統整
Why?
為了解決,需要訂閱許多科技新聞網站而生,整理每日科技新聞,定時派送e-mail給自己。
Tech News Providers
- iThome
- Business Next - 數位時代
- INSIDE 硬塞的
Requirements
pip install technews-tw
Get Today's News
取得今日新聞
from technews import TechNews
TechNews("business").get_today_news()
TechNews("ithome").get_today_news()
TechNews("inside").get_today_news()
Get news by page
取得第1頁至第3頁所有科技新聞
from technews import TechNews
TechNews("business").get_news_by_page(3)
TechNews("ithome").get_news_by_page(3)
TechNews("inside").get_news_by_page(3)
Send Today's News by Email
將今天的科技新聞傳送給接收者
# set environment variables
# sender only support "gmail" and "hotmail"
export MAIL_SENDER="sender@gmail.com"
export MAIL_SENDER_PWD="iampassword"
export MAIL_RECV="user01@gmail.com,user02@hotmail.com"
python -m technews.daily_news
Integrate with Crontab
使用crontab,自動發送每日科技新聞,將下列指定寫入crontab設定檔
輸入: crontab -e 進入到設定介面
MAIL_SENDER="sender@gmail.com"
MAIL_SENDER_PWD="mypassword"
MAIL_RECV="receiver@gmail.com"
LOG_LEVEL="DEBUG"
# 每天晚上七點發送
0 19 * * 1-7 python3 -m technews.daily_news > technews_log.log 2>&1
Release Note
2023.10.21
- 移除對科技報橘的支援,因為太難維護, 太難爬了. GG
Release files for technews-tw 1.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| technews-tw-1.3.5.tar.gz | 36.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| technews_tw-1.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.5 kB
Release files / technews-tw-1.3.5.tar.gz
| Download URL | technews-tw-1.3.5.tar.gz |
|---|---|
| Size | 36.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
329b288ae3f91d13b76e7338abf8024fd6feadf279f8d57581ff9faec9351a6c
|
|
BLAKE2b-256 checksum How to use checksums |
e0971ffc597a6bd6e1c72df4ada2daa04dc40928289626f11946ea6603d65c96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / technews_tw-1.3.5-py3-none-any.whl
| Download URL | technews_tw-1.3.5-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
778044b15d32a848a3e2cc6c72d5994319ce00a1e7a4d76ed8524a6ecd5579ec
|
|
BLAKE2b-256 checksum How to use checksums |
7e8087085c5e37e755b1c20a39611b702fc3e7c44ba8c999533374dbbc00ebaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|