Scraper news article in Viet Nam
Project description
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) |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
newsfx-0.0.9.tar.gz
(2.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file newsfx-0.0.9.tar.gz.
File metadata
- Download URL: newsfx-0.0.9.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d89170cb563b07df6e36a1813a8295bf26fc7437fb76f32eda03867082adadba
|
|
| MD5 |
4c6b3dae39ae41a180e4e5c453130eec
|
|
| BLAKE2b-256 |
a7449d846f8acd79ead587970ce63889f3342c74dcd483c3e7789cc7fdad3cdd
|
File details
Details for the file newsfx-0.0.9-py3-none-any.whl.
File metadata
- Download URL: newsfx-0.0.9-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dbfa0334d11c68853f114c31c284d6e96a568fb72cbd1e06e78d32d023ee543
|
|
| MD5 |
af8d9cc3783a0f527567475ade778481
|
|
| BLAKE2b-256 |
12c421646015f048e2e863c3cc91ee569c0c2e3c7325a24e12b7862c27b6e615
|