Skip to main content

This script collects articles from Wall Street Journal and returns it in dict format.

Project description

nsloader

Test PyPI version
This script collects articles from Wall Street Journal and returns it in dict format.

Installing nsloader and Supported Versions


nsloader is not registered on the pypi. You have to download from github directly.

$ python -m pip install nsloader

nsloader is tested by Python 3.10.

Dependencies


Additionaly, you have to execute install playwright in your execution environment.

Usage


To load the Wall Street Journal articles and parse to dictionay format.

Wall Street Journal

NOTE: You have to set 2 enviroment valiables name as WSJ_USERNAME and WSJ_PASSWORD before execution.

>>> from nsloader import wsj
>>> article = wsj.Article()
>>> article.load('https://www.wsj.com/articles/...')
>>> print(article.to_dict())
{"url": "https://www.wsj.com/articles/...", "title": "The Fed ...", "sub_title": "As expected ...",  ... }

Project details


Download files

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

Source Distribution

nsloader-1.1.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

nsloader-1.1.0-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

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