Metadata-Version: 2.1
Name: obscraper
Version: 0.8.3
Summary: obscraper: scrape posts from the overcomingbias blog
Project-URL: changelog, https://obscraper.readthedocs.io/en/stable/changelog.html
Project-URL: repository, https://github.com/chris-mcdo/obscraper
Project-URL: issues, https://github.com/chris-mcdo/obscraper/issues
Author-email: Christopher McDonald <cmcdonal33@gmail.com>
License: MIT License
        
        Copyright (c) 2022 Christopher McDonald
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: api,bs4,overcomingbias
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Requires-Python: >=3.8
Requires-Dist: beautifulsoup4>=4.8
Requires-Dist: cachetools>=4.2
Requires-Dist: httpx[http2]>=0.20.0
Requires-Dist: lxml>=3
Requires-Dist: python-dateutil>=2.7
Requires-Dist: pytz
Requires-Dist: trio>=0.19.0
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-trio; extra == 'test'
Description-Content-Type: text/x-rst

.. image:: https://raw.githubusercontent.com/chris-mcdo/obscraper/main/docs/source/img/logo.svg
   :target: https://obscraper.readthedocs.io/en/stable/
   :align: center
   :height: 200
   :alt: obscraper


obscraper: scrape posts from the overcomingbias blog
====================================================

.. image:: https://img.shields.io/pypi/v/obscraper.svg
    :target: https://pypi.org/project/obscraper/
    :alt: Project Version on PyPI

.. image:: https://img.shields.io/pypi/pyversions/obscraper.svg
    :target: https://pypi.org/project/obscraper/
    :alt: Supported Python Versions

.. image:: https://readthedocs.org/projects/obscraper/badge/?version=latest
  :target: https://obscraper.readthedocs.io/en/latest/?badge=latest
  :alt: Documentation Status

.. image:: https://codecov.io/gh/chris-mcdo/obscraper/branch/main/graph/badge.svg
  :target: https://codecov.io/gh/chris-mcdo/obscraper
  :alt: Unit Test Coverage
  
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
  :target: https://github.com/psf/black
  :alt: Code Style: Black

.. image:: https://img.shields.io/badge/license-MIT-purple
  :target: https://github.com/chris-mcdo/obscraper/blob/main/LICENSE
  :alt: MIT License


``obscraper`` lets you scrape blog posts and associated metadata from the
`overcomingbias <https://www.overcomingbias.com/>`_ blog.

It's easy to get a single post::

    >>> import obscraper
    >>> intro_url = 'https://www.overcomingbias.com/2006/11/introduction.html'
    >>> post = obscraper.get_post_by_url(intro_url)
    >>> post.title
    'How To Join'
    >>> post.plaintext
    'How can we better believe what is true? ...'
    >>> post.internal_links
    {'http://www.overcomingbias.com/2007/02/moderate_modera.html': 1, 
    'http://www.overcomingbias.com/2006/12/contributors_be.html': 1}
    >>> post.comments
    20

Or a full list of post URLs and edit dates::

    >>> import obscraper
    >>> edit_dates = obscraper.get_edit_dates()
    ...
    >>> len(edit_dates)
    4352
    >>> {url: str(edit_dates[url]) for url in list(edit_dates)[:5]}
    {'2022/01/much-talk-is-sales-patter':
    '2022-01-14 20:46:35+00:00',
    '2022/01/old-man-rant':
    '2022-01-13 15:21:33+00:00',
    '2022/01/my-11-bets-at-10-1-odds-on-10m-covid-deaths-by-2022':
    '2022-01-12 19:15:10+00:00',
    '2022/01/to-innovate-unify-or-fragment':
    '2022-01-11 01:03:44+00:00',
    '2022/01/on-what-is-advice-useful':
    '2022-01-10 18:46:26+00:00'}

Features
********

- Get posts by their URLs or edit dates, or get all posts hosted on the
  overcomingbias site

- Provides detailed post metadata including post URLs, titles, authors, tags,
  publish dates, and last edit dates

- Provides summary of post content including full post text as HTML or
  plaintext, and a list of hyperlinks to other overcomingbias posts

- Asynchronous execution and caching for fast downloads

- Use via ``import obscraper`` or the simple command line interface

- Comprehensively tested

- Supports python 3.8+

Documentation
*************

Read the full documentation `here <https://obscraper.readthedocs.io/en/stable/>`_,
including the `Installation and Getting Started Guide
<https://obscraper.readthedocs.io/en/stable/getting-started.html>`_ and the
`Public API Reference <https://obscraper.readthedocs.io/en/stable/api.html>`_.


Bugs/Requests
*************

Please use the `GitHub issue tracker <https://github.com/chris-mcdo/obscraper/issues>`_
to submit bugs or request features.

Changelog
*********

See the `Changelog <https://obscraper.readthedocs.io/en/stable/changelog.html>`_
for a list of fixes and enhancements at each version.

License
*******

Copyright (c) 2022 Christopher McDonald

Distributed under the terms of the
`MIT <https://github.com/chris-mcdo/obscraper/blob/main/LICENSE>`_ license.

All overcomingbias posts are copyright the original authors.
