eckendoerffer
commited on
Commit
•
2d8e840
1
Parent(s):
c73141b
Delete extract_news/README.md
Browse files- extract_news/README.md +0 -60
extract_news/README.md
DELETED
@@ -1,60 +0,0 @@
|
|
1 |
-
|
2 |
-
# NEWS FR
|
3 |
-
|
4 |
-
The "NEWS FR" module allows for the extraction of online press articles from over a hundred different sources.
|
5 |
-
|
6 |
-
## Installation
|
7 |
-
|
8 |
-
To set up the module, follow the steps below:
|
9 |
-
|
10 |
-
1. **Database Setup**:
|
11 |
-
- Create a database and incorporate the two tables present in `database.sql`.
|
12 |
-
|
13 |
-
2. **Database Configuration**:
|
14 |
-
- Update your MySQL connection information in the `functions_mysqli.php` file.
|
15 |
-
|
16 |
-
3. **Dependencies Installation**:
|
17 |
-
- The script requires the installation of `electrolinux/phpquery`. Install it using composer:
|
18 |
-
```
|
19 |
-
composer require electrolinux/phpquery
|
20 |
-
```
|
21 |
-
|
22 |
-
## Usage
|
23 |
-
|
24 |
-
### 1. 1_extract_rss.php:
|
25 |
-
|
26 |
-
This script fetches RSS feeds from various media outlets and adds URLs for further extraction.
|
27 |
-
|
28 |
-
```bash
|
29 |
-
php 1_extract_rss.php
|
30 |
-
```
|
31 |
-
|
32 |
-
### 2. 2_extract_news.php:
|
33 |
-
|
34 |
-
This script retrieves the sources of articles for subsequent local processing.
|
35 |
-
|
36 |
-
```bash
|
37 |
-
php 2_extract_news.php
|
38 |
-
```
|
39 |
-
|
40 |
-
### 3. 3_extract_news_txt.php:
|
41 |
-
|
42 |
-
This script extracts the text content of press articles and saves it (title + description + text) to a `.txt` file.
|
43 |
-
|
44 |
-
```bash
|
45 |
-
php 3_extract_news_txt.php
|
46 |
-
```
|
47 |
-
After completing this step, you can use the Python script located at /dataset/2_cleaning_txt.py to standardize the text for your dataset.
|
48 |
-
|
49 |
-
### 4. 4_extract_news_url.php:
|
50 |
-
|
51 |
-
This script allows for the extraction of links to other articles from local article sources. This ensures swift retrieval of numerous past articles, as opposed to fetching only the most recent ones.
|
52 |
-
|
53 |
-
```bash
|
54 |
-
php 4_extract_news_url.php
|
55 |
-
```
|
56 |
-
After using this script, you'll need to run 2_extract_news.php again to retrieve the sources of the new articles, as well as 3_extract_news_txt.php to extract the text from these articles.
|
57 |
-
|
58 |
-
---
|
59 |
-
|
60 |
-
PHP + MySQL was chosen for this section to facilitate debugging, and to allow display by source or by media.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|