Skip to main content

No project description provided

Project description

FNews

PyPI version

FNews is an open-source, easy-to-use Fake News crawler that extracts structured information from the Fake news websites for machine learning purposes. It can recursively follow internal hyperlinks and read RSS feeds to fetch the most recent fake articles. You only need to provide the desired field ('politics', 'Entertainment') of the fake news website to crawl it completely.

Extracted information

FNews extracts the following attributes from Fake news articles.

  • article headline
  • article content (main text)
  • article's author name
  • publication date

Features

  • works out of the box: install with pip, add the desired field of your articles, run :-)
  • run FNews conveniently using its CLI mode

Modes and use cases

FNews supports two main use cases, which are explained in more detail in the following.

CLI mode

  • stores extracted results in csv files in your own storage
  • simple but extensive configuration (if you want to tweak the results)
  • revisions: crawl fake articles multiple times and track changes

Library mode

  • crawl and extract information given a list of fake article URLs
  • to use FNews within your own Python code

Getting started

It's super easy.

Installation

$ pip3 install FNews

Use within your own code (as a library)

You can access the core functionality of FNews, i.e. extraction of semi-structured information from one or more news articles, in your own code by using FNews in library mode.

from FNews import getArticles

getArticles(field="politics", number=50, dropna=True)

If you want to crawl multiple fields at a time, optionally with a timeout in seconds and number of articles for each field

FNews.from_fields([field1, field2, ...], number=10, timeout=6)

Run the crawler (via the CLI)

$ FNews-getArticles field [number] [dropna]

FNews will then start crawling a few fake articles and The results are stored by default in CSV file.

License

Copyright 2023-2024 Ahmed Bendrioua

Project details


Release history Release notifications | RSS feed

This version

1.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FNews-1.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FNews-1.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file FNews-1.3.tar.gz.

File metadata

  • Download URL: FNews-1.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for FNews-1.3.tar.gz
Algorithm Hash digest
SHA256 cc06675b962492c8721cda8a6a55f9e7188f8bfdfa219811ac5e728f6e6883b2
MD5 cc7cf2c266e2252d520d7272a8d9746c
BLAKE2b-256 254ed3d47ea4c8686178684b99537245bacb4c4de84055cc9d7faad387f271c2

See more details on using hashes here.

File details

Details for the file FNews-1.3-py3-none-any.whl.

File metadata

  • Download URL: FNews-1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for FNews-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 09e263ee8a880caa6d10cd676b652262ae57edd8e6a44d1f8665801099daea1b
MD5 07ffdd2876e3c4ff40d2fef5de37358a
BLAKE2b-256 d6c8aa9282eecf3d20b4bae055e4d4c8452feef25729625601e72a44c4ed372a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page