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
1=== modified file 'blogger-frame.py'
2--- blogger-frame.py 2013-03-13 01:25:34 +0000
3+++ blogger-frame.py 2013-03-13 01:34:22 +0000
4@@ -1,21 +1,21 @@
5 #!/usr/bin/python
6-
7-"""
8- blogger-frame: a script for pulling all images from a blogger-powered blog
9- Copyright (C) 2013 Josh McJilton <mcjilton@gmail.com>
10-
11- This program is free software: you can redistribute it and/or modify
12- it under the terms of the GNU Affero General Public License as published by
13- the Free Software Foundation, version 3 of the License.
14-
15- This program is distributed in the hope that it will be useful,
16- but WITHOUT ANY WARRANTY; without even the implied warranty of
17- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18- GNU Affero General Public License for more details.
19-
20- You should have received a copy of the GNU Affero General Public License
21- along with this program. If not, see <http://www.gnu.org/licenses/>.
22-"""
23+#
24+#
25+# blogger-frame: a script for pulling all images from a blogger-powered blog
26+# Copyright (C) 2013 Josh McJilton <mcjilton@gmail.com>
27+#
28+# This program is free software: you can redistribute it and/or modify
29+# it under the terms of the GNU Affero General Public License as published by
30+# the Free Software Foundation, version 3 of the License.
31+#
32+# This program is distributed in the hope that it will be useful,
33+# but WITHOUT ANY WARRANTY; without even the implied warranty of
34+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35+# GNU Affero General Public License for more details.
36+#
37+# You should have received a copy of the GNU Affero General Public License
38+# along with this program. If not, see <http://www.gnu.org/licenses/>.
39+
40
41 import requests
42 import json
43@@ -30,16 +30,16 @@
44 if r.status_code == 200:
45 blog_details = r.json()
46 posts = blog_details['posts']['selfLink']
47-
48+
49 postcount = 0
50 ptoken = ""
51 items = ""
52 images = list()
53 lowres = 0
54 highres = 0
55-
56+
57 while True:
58- p = requests.get(posts + "?" + ptoken + "maxResults=20&fields=prevPageToken%2CnextPageToken%2Citems(id%2Ccontent)&key=" + mykey)
59+ p = requests.get(posts + "?" + ptoken + "maxResults=20&fields=prevPageToken%2CnextPageToken%2Citems(id%2Ccontent)&key=" + mykey)
60 resp_details = p.json()
61 postcount += len(resp_details.get('items'))
62 items = resp_details.get('items')

Subscribers

People subscribed via source and target branches

to all changes: