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) |
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| newsfx-0.0.9.tar.gz | 2.3 kB | Without provenance | Details for newsfx-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| newsfx-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for newsfx-0.0.9-py3-none-any.whl |
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
|
Security for newsfx 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.