Datasets:
Add detailed dataset card and the scraping pipeline used to build it
Browse files
README.md
CHANGED
|
@@ -259,7 +259,8 @@ The crawler is a breadth-first whole-site crawler built on
|
|
| 259 |
that start with `https://www.compact-online.de/` or with `/` (which are then made absolute) are added to the
|
| 260 |
frontier. URLs containing `#` are dropped.
|
| 261 |
4. **URL filtering.** Before fetching, a URL is skipped when it contains `/files/`, `/video/`,
|
| 262 |
-
`.jpg`, `.pdf`, `.xml`, `.pptx`, `.shtml` or `.epub`, or when it has fewer than five path
|
|
|
|
| 263 |
5. **Fetching.** Each URL gets up to 10 attempts with a 10 s timeout.
|
| 264 |
6. **Extraction.** `get_content()` turns the HTML into a record (see below). Only pages with a
|
| 265 |
non-empty `content` are written out, as `pages/<flattened-url>.json`.
|
|
@@ -313,8 +314,8 @@ Each article is stored as a JSON file of the shape
|
|
| 313 |
1. `glob("pages/*.json")` collects every article file.
|
| 314 |
2. The nested records are flattened into one `pandas.DataFrame` column per field.
|
| 315 |
3. `df.drop_duplicates(subset=['title'])` removes duplicates — the same article is often reachable
|
| 316 |
-
under several URLs (print/mobile variants, tracking parameters, section mirrors), and
|
| 317 |
-
headline is the most reliable identity key available.
|
| 318 |
4. The frame is written to `compact_de.json` and pushed with
|
| 319 |
`datasets.Dataset.from_pandas(df).push_to_hub("SinclairSchneider/compact_de")`.
|
| 320 |
|
|
|
|
| 259 |
that start with `https://www.compact-online.de/` or with `/` (which are then made absolute) are added to the
|
| 260 |
frontier. URLs containing `#` are dropped.
|
| 261 |
4. **URL filtering.** Before fetching, a URL is skipped when it contains `/files/`, `/video/`,
|
| 262 |
+
`.jpg`, `.pdf`, `.xml`, `.pptx`, `.shtml` or `.epub`, or when it has fewer than five path
|
| 263 |
+
segments (which filters out section index pages).
|
| 264 |
5. **Fetching.** Each URL gets up to 10 attempts with a 10 s timeout.
|
| 265 |
6. **Extraction.** `get_content()` turns the HTML into a record (see below). Only pages with a
|
| 266 |
non-empty `content` are written out, as `pages/<flattened-url>.json`.
|
|
|
|
| 314 |
1. `glob("pages/*.json")` collects every article file.
|
| 315 |
2. The nested records are flattened into one `pandas.DataFrame` column per field.
|
| 316 |
3. `df.drop_duplicates(subset=['title'])` removes duplicates — the same article is often reachable
|
| 317 |
+
under several URLs (print/mobile variants, tracking parameters, section mirrors), and
|
| 318 |
+
the headline is the most reliable identity key available.
|
| 319 |
4. The frame is written to `compact_de.json` and pushed with
|
| 320 |
`datasets.Dataset.from_pandas(df).push_to_hub("SinclairSchneider/compact_de")`.
|
| 321 |
|