from google.appengine.api import urlfetch
from xml.dom import minidom
url="http://api.flickr.com/services/rest/?method=flickr.photos.search&text=test&api_key=XXX"
result = urlfetch.fetch(url)
dom = minidom.parseString(result.content)
photos = []
for node in dom.getElementsByTagName('photo'):
photos.append({
'server': node.getAttribute('server'),
'id': node.getAttribute('id'),
'secret': node.getAttribute('secret'),
'owner': node.getAttribute('owner'),
'title': node.getAttribute('title')
})
# print node.getAttribute('id'), \
# node.getAttribute('title')
----------------------------
[ templates]
{% for e in photos %}
<a href="http://www.flickr.com/photos/{{ e.owner }}/{{ e.id }}/sizes/" >
<img src="http://static.flickr.com/{{ e.server }}/{{ e.id }}_{{ e.secret }}_s.jpg"
title="{{ e.title }}" border=0 /></a>
{% endfor %}
2008年5月24日土曜日
flickr.photos.search (Google App Engine)
Swift+VSCodeでまた「一致するワークスペースシンボルがありません」で悩む
Xcode のプロジェクトフォルダを vscode で開いて cmd+T のシンボル検索で 「一致するワークスペースシンボルがありません」 となる 結論としては Package.swift ファイルが必要だった。 一行目の // swift-tools-version: 6....
-
Xcode のプロジェクトフォルダを vscode で開いて cmd+T のシンボル検索で 「一致するワークスペースシンボルがありません」 となる 結論としては Package.swift ファイルが必要だった。 一行目の // swift-tools-version: 6....
-
SDK 1.10 から Gql でも != がサポートされたが、これは <=, >= などと同じ扱いなので、 日付で <= を使うと、 他の条件で != が使えなくなる。 また、 order by などの sort も <= を利用した場...
-
DeadlineExceededError のエラー対応を検討 対応例 http://stage.vambenepe.com/archives/category/implementation 結果 google/appengine/runtime/apiproxy.py を参考に...