Merge lp:~kirkland/lanyap/blogger-frame into lp:~lanyap/lanyap/blogger-frame

Proposed by Dustin Kirkland 
Status: Merged
Merged at revision: 3
Proposed branch: lp:~kirkland/lanyap/blogger-frame
Merge into: lp:~lanyap/lanyap/blogger-frame
Diff against target: 62 lines (+20/-20)
1 file modified
blogger-frame.py (+20/-20)
To merge this branch: bzr merge lp:~kirkland/lanyap/blogger-frame
Reviewer Review Type Date Requested Status
Josh McJilton Pending
Review via email: mp+153040@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'blogger-frame.py'
--- blogger-frame.py 2013-03-13 01:25:34 +0000
+++ blogger-frame.py 2013-03-13 01:34:22 +0000
@@ -1,21 +1,21 @@
1#!/usr/bin/python1#!/usr/bin/python
22#
3"""3#
4 blogger-frame: a script for pulling all images from a blogger-powered blog4# blogger-frame: a script for pulling all images from a blogger-powered blog
5 Copyright (C) 2013 Josh McJilton <mcjilton@gmail.com>5# Copyright (C) 2013 Josh McJilton <mcjilton@gmail.com>
66#
7 This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Affero General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9 the Free Software Foundation, version 3 of the License.9# the Free Software Foundation, version 3 of the License.
1010#
11 This program is distributed in the hope that it will be useful,11# This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Affero General Public License for more details.14# GNU Affero General Public License for more details.
15 15#
16 You should have received a copy of the GNU Affero General Public License16# You should have received a copy of the GNU Affero General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18"""18
1919
20import requests20import requests
21import json21import json
@@ -30,16 +30,16 @@
30if r.status_code == 200:30if r.status_code == 200:
31 blog_details = r.json()31 blog_details = r.json()
32 posts = blog_details['posts']['selfLink']32 posts = blog_details['posts']['selfLink']
33 33
34 postcount = 034 postcount = 0
35 ptoken = ""35 ptoken = ""
36 items = ""36 items = ""
37 images = list()37 images = list()
38 lowres = 038 lowres = 0
39 highres = 039 highres = 0
40 40
41 while True:41 while True:
42 p = requests.get(posts + "?" + ptoken + "maxResults=20&fields=prevPageToken%2CnextPageToken%2Citems(id%2Ccontent)&key=" + mykey) 42 p = requests.get(posts + "?" + ptoken + "maxResults=20&fields=prevPageToken%2CnextPageToken%2Citems(id%2Ccontent)&key=" + mykey)
43 resp_details = p.json()43 resp_details = p.json()
44 postcount += len(resp_details.get('items'))44 postcount += len(resp_details.get('items'))
45 items = resp_details.get('items')45 items = resp_details.get('items')

Subscribers

People subscribed via source and target branches

to all changes: