Skip to main content

No project description provided

Project description

Medium Muncher

Medium makes content readily available for machine consumption through the format=json param, and content feeds via the feeds path, however the XML and JSON responses are not exactly plug-and-play for redisplaying content. Enter this package.


via pip with

pip3 install mediummuncher


Getting a story as stand-alone HTML (with head and body tags)

from medium_muncher import MediumMuncher

muncher = MediumMuncher()
#returns "<!doctype html><head>... "

Getting a story as an html snippet (no head or body)

#returns "<p>article text!..."

Using the verbose flag returns a tuple with the html and a dictionary of interesting article attributes such as title, published date etc.

html_snippet=muncher.munch_story('',snippet=True, verbose=True)
#returns tuple ("<p>article text!...", {"title":"this amazing article"...,)

Getting all the story urls for a given author

#returns tuple ("",..,) 

Putting it all together to extract all stories for a given author

for url in muncher.munch_author_feed('ethan.m.knox'):
    stories.append(muncher.munch_story( url,


Please feel free to fork and PR! Can always use another helping hand.

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 mediumMuncher, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size mediumMuncher-0.0.3-py3.7.egg (7.8 kB) File type Egg Python version 3.7 Upload date Hashes View hashes
Filename, size mediumMuncher-0.0.3-py3-none-any.whl (4.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size mediumMuncher-0.0.3.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page