Skip to main content

A tool for web news scraping.

Project description


A tool for scraping news from web.

There is no AI here, just good old-fashioned if-else rules.


Basic usage:

import newsman

# start reading
src = ''
news =

# show articles
for article in news:
    print(f'Url: {article.url.url}')
    print(f'Title: {article.title}')
    print(f'Text: {article.text}')
    print(f'Main image: {article.main_image}')

Customizing configuration:

import newsman

# get configuration
config = newsman.get_config()

# add a proxy for connection
config['proxies'] = proxies

# update accepted/rejected domains
config['accepted_domains'] = ['', '']
config['rejected_domains'] += ['', '']

# override default values for web retrieval
config['link_depth'] = 2            # crawling depth level
config['scan_limit'] = 10           # max. number of scanned sites

# set pipes
pipes = ['byte2html', 'html2text', 'text2title', 'html2image']
news = newsman.News(config, pipes)

src = ''
pages = news(src)

Proxy information is formatted according to Requests format.


pip install newsman

Project details

Download files

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

Files for newsman, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size newsman-1.1.0-py3-none-any.whl (19.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size newsman-1.1.0.tar.gz (13.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page