Skip to main content

newsfx

Dự án đang trong quá trình thực hiện

Bắt đầu nhanh

Cài đặt

Chỉ support Python 3.6+

pip install newsfx

Thực hiện

from newsfx import NewsFX
run = NewsFX('https://vnexpress.net/thoi-su/nguoi-dan-un-un-tro-lai-sai-gon-ha-noi-sau-ky-nghi-le-3917122.html')
run.parser()
print(run.get_title) # Người dân ùn ùn trở lại Sài Gòn, Hà Nội sau kỳ nghỉ lễ

lấy hình

#lấy link của hình 
print(run.get_top_image_link) #https://link_dan_toi_file.jpg

# save hình 
run.save_top_image_link(name='ten_file_anh.jpg')

Trang tin hỗ trợ

news site title published_date summary content author top_image
VnExpress ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Tuổi Trẻ Online ✔️ ✔️ ✔️ ✔️ ✔️ ️️️️️️✔️
Thanh Niên ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Tiền Phong
Lao Động
Báo mới
Người Lao Động
Nhân Dân
Đời Sống Pháp Luật
Vietnamnet
Zing News
Dân Trí
Nhịp Sống Số
Tri Thức Trẻ
Vietnam Plus

TODO

  • Tự động nhận dạng url đầu vào
  • Định dạng kết quả trả về trong dictionary
Tên Kiểu trả về Mô tả Hỗ trợ
title string Tiêu đề bài viết ✔️
html string Code html bài viết ✔️
text string Nội dung bài viết chưa được xử lý ✔️
clean_text string Nội dung bài viết đã được xử lý
author list Tác giả bài viết ✔️
published date Ngày đăng bài viết ✔️
top_image string Hình ảnh đặc trưng của bài viết ✔️
images list Danh sách hình ảnh có trong bài viết ✔️
keywords list Từ khóa bài viết (có sẵn từ bài viết)

Release files for newsfx 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for newsfx 0.0.9
File Size Uploaded
newsfx-0.0.9.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for newsfx 0.0.9
File Interpreter ABI Platform
newsfx-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size:4.5 kB

Release files / newsfx-0.0.9.tar.gz

Download URL newsfx-0.0.9.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d89170cb563b07df6e36a1813a8295bf26fc7437fb76f32eda03867082adadba
BLAKE2b-256 checksum
How to use checksums
a7449d846f8acd79ead587970ce63889f3342c74dcd483c3e7789cc7fdad3cdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

Release files / newsfx-0.0.9-py3-none-any.whl

Download URL newsfx-0.0.9-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dbfa0334d11c68853f114c31c284d6e96a568fb72cbd1e06e78d32d023ee543
BLAKE2b-256 checksum
How to use checksums
12c421646015f048e2e863c3cc91ee569c0c2e3c7325a24e12b7862c27b6e615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.7

1 release file

0.0.5

1 release file

0.0.3

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page