Created
March 15, 2013 01:44
-
-
Save jaredlewis/5166890 to your computer and use it in GitHub Desktop.
This file contains 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
# Get the stories from source proxies | |
stories = [] | |
source_stream_url = settings.SOURCEPROXIES_API + "/sources/stream" | |
source_stream_params = { | |
"source_uuids": ",".join([str(source_uuid) for source_uuid in source_uuids]), | |
"offset": offset, | |
"num_stories": num_stories, | |
"older_than": older_than, | |
"newer_than": newer_than, | |
"exclude_id_list": exclude_id_list | |
} | |
source_stream_response = requests.post(source_stream_url, params=source_stream_params) | |
if source_stream_response.status_code == requests.codes.ok: | |
stories = source_stream_response.json.get('data', { | |
'stories': [] | |
}).get('stories') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment