Skip to main content

lefaso-net-scraper

PyPI version

Description

lefaso-net-scraper is a robust and versatile Python library designed to efficiently extract articles from the popular online news source in Burkina Faso, www.lefaso.net. This powerful scraping tool allows users to effortlessly collect article content and user comments on lefaso.net.

Important

This scraper, like other scrapers, is based on the structure of the target website. Changes to the website's structure can affect the scraper. We use automated workflows to detect these issues frequently, but we cannot catch all of them. Please report any issues you encounter and use the latest version.

JSON/dictionary Fields

Field Description
article_topic Category or subject of the article.
article_title The main headline or title of the article.
article_published_date Date when the article was published.
article_origin Source or platform where the article was published.
article_url Web link to the article.
article_content Full text or body of the article.
article_comments Feedback or responses from readers.

Installation

  • Using pip
pip install --upgrade  lefaso-net-scraper

# For jupiter support
pip install --upgrade  lefaso-net-scraper[notebook]
  • Using poetry
poetry add lefaso-net-scraper

# For jupiter support
poetry add lefaso-net-scraper[notebook]

Usage

# coding: utf-8

from lefaso_net_scraper import LefasoNetScraper

section_url = 'https://lefaso.net/spip.php?rubrique473'
scraper = LefasoNetScraper(section_url)
data = scraper.run()
  • Settings Pagination range
# coding: utf-8

from lefaso_net_scraper import LefasoNetScraper

section_url = 'https://lefaso.net/spip.php?rubrique473'
scraper = LefasoNetScraper(section_url)
scraper.set_pagination_range(start=20, stop=100)
data = scraper.run()
  • Save data to csv
# coding: utf-8

from lefaso_net_scraper import LefasoNetScraper
import pandas as pd

section_url = 'https://lefaso.net/spip.php?rubrique473'
scraper = LefasoNetScraper(section_url)
data = scraper.run()
df = pd.DataFrame.from_records(data)
df.to_csv('path/to/df.csv')

We ❤ open source

Metadata

Release files for lefaso-net-scraper 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lefaso-net-scraper 0.4.0
File Size Uploaded Provenance
lefaso_net_scraper-0.4.0.tar.gz 16.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lefaso-net-scraper 0.4.0
File Interpreter ABI Platform
lefaso_net_scraper-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.5 kB

Release files / lefaso_net_scraper-0.4.0.tar.gz

Download URL lefaso_net_scraper-0.4.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c7185d8a04b95214407f1409fd5e724e773144b2a6645e3f172b867829213611
BLAKE2b-256 checksum
How to use checksums
2f0099a6fee8bbb0aabe1c1db3da5bea3b07ab6334fccf05979798a1185f59fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure

Release files / lefaso_net_scraper-0.4.0-py3-none-any.whl

Download URL lefaso_net_scraper-0.4.0-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63d07b6ae7cbcbdeb2eb976c2c6981d3fb41162b1a538bcc1e8bfb0703c900e3
BLAKE2b-256 checksum
How to use checksums
245be0a16bdc3b8b6233a9292340ab587843d87af4ba0e9a2e161ed030905c07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure

Security for lefaso-net-scraper 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page