This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ParentController.groovy | |
package stackoverflow | |
class ParentController { | |
def index() { | |
render "Parent" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires: requests and readability-lxml (http://pypi.python.org/pypi/readability-lxml) (pip install requests readability-lxml) | |
import requests | |
def extract_article_contents(url): | |
""" | |
Fetch the main body of content | |
Returns the html, a plaintext version, the title and subtitle | |
""" |