A python module for parsing HTML into news components.
Project description
newsmeta
A python module for parsing HTML into news components.
Dependencies :globe_with_meridians:
- Python 3.7
- Newspaper3k 0.2.8
- BeautifulSoup 0.0.1
- Dateutil 2.8.2
- LangDetect 1.0.9
- Extruct 0.13.0
- DeepTranslator 1.5.4
- HTML5Lib 1.1
Installation :inbox_tray:
This is a python package hosted on pypi, so to install simply run the following command:
pip install newsmeta
Usage example :eyes:
In order to use this library simply feed it the downloaded HTML and the URL of the news piece, like so:
import newsmeta
with open("article.html") as article_fh:
article = newsmeta.parse(article_fh.read(), "http://www.article.com/article")
print(article.title)
License :memo:
The project is available under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
newsmeta-1.0.2.tar.gz
(5.1 kB
view hashes)