Skip to content

matthagy/substack_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

substack_client

A prototype client library for accessing Substack content using the REST API that serves the frontend.

This library is not associated with Substack the company in any way. Further, it does not use an official API but instead uses a non-documented REST API that serves the website. Therefore, the library could break at anytime should that internal API be revised.

You can learn more in the blog post, Developing a Substack client to fetch posts and comments.

Installation

python setup.py install

Example

The example.py file demonstrates use of the library.

from pprint import pprint
from time import sleep
from substack_client import SubstackClient

client = SubstackClient.create('www.slowboring.com')
posts = client.get_new_posts(offset=0)
pprint(posts)
sleep(1)
comments = client.get_comments(posts[0]['id'])
pprint(comments)

About

A prototype client library for accessing Substack content using the REST API that serves the frontend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages