Skip to content

Commit

Permalink
Update to README, add recording gifs to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTheFactory committed Mar 27, 2024
1 parent a4aba95 commit 586b317
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[![Coverage status](https://coveralls.io/repos/github/AndyTheFactory/newspaper4k/badge.svg?branch=master)](https://coveralls.io/github/AndyTheFactory/newspaper4k)
[![Documentation Status](https://readthedocs.org/projects/newspaper4k/badge/?version=latest)](https://newspaper4k.readthedocs.io/en/latest/)

At the moment the Newspaper4k Project is a fork of the well known newspaper3k by [codelucas](https://github.com/codelucas/newspaper) which was not updated since September 2020. The initial goal of this fork is to keep the project alive and to add new features and fix bugs.
Newspaper4k Project grew from a fork of the well known newspaper3k by [codelucas](https://github.com/codelucas/newspaper) which was not updated since September 2020. The initial goal of this fork was to keep the project alive and to add new features and fix bugs. As of version 0.9.3 there are many new features and improvements that make Newspaper4k a great tool for article scraping and curation. To make the migration to Newspaper4k easier, all the classes and methods from the original project were kept and the new features were added on top of them. All API calls from the original project still work as expected, such that for users familiar with newspaper3k you will feel right at home with Newspaper4k.

I have duplicated all issues on the original project and will try to fix them. If you have any issues or feature requests please open an issue here.
At the moment of the fork, in the original project were over 400 open issues, which I have duplicated, and as of v 0.9.3 only about 180 issues still need to be verified (many are already fixed, but it's pretty cumbersome to check - [hint hint ... anyone contributing?](https://github.com/AndyTheFactory/newspaper4k/discussions/606)). If you have any issues or feature requests please open an issue here.

| <!-- --> | <!-- --> |
|-------------|-------------|
Expand All @@ -31,6 +31,9 @@ python -m newspaper --url="https://edition.cnn.com/2023/11/17/success/job-seeker

```
More information about the CLI can be found in the [CLI documentation](https://newspaper4k.readthedocs.io/en/latest/user_guide/cli_reference.html).

![cli demo](docs/_static/recording-cli.gif)

## Using the Python API

Alternatively, you can use Newspaper4k in Python:
Expand Down Expand Up @@ -70,6 +73,8 @@ print(article.summary)

```

![source demo](docs/_static/recording-python.gif)

## Parsing and scraping whole News Sources (websites) using the Source Class

This way you can build a Source object from a newspaper websites. This class will allow you to get all the articles and categories on the website. When you build the source, articles are not yet downloaded. The `build()` call will parse front page, will detect category links (if possible), get any RSS feeds published by the news site, and will create a list of article links.
Expand Down Expand Up @@ -118,6 +123,9 @@ print(len(articles))

print(articles[0].title)
```



## As of version 0.9.3, Newspaper4k supports Google News as a special Source object

First, make sure you have the `google` extra installed, since we rely on the [Gnews package](https://github.com/ranahaani/GNews/) to get the articles from Google News. You can install it using pip like this:
Expand Down
Binary file added docs/_static/recording-cli.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/recording-python.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 586b317

Please sign in to comment.