この記事は Python その2 Advent Calendar 2018 - Qiita の1日目です。 responderとは GitHub - kennethreitz/responder: a familiar HTTP Service Framework for Python 2018年10月に公開された イケてるPython WebFramework です。 requestsやpipenvなどの開発者である Kenneth Reitz が(おそらく)今年のHacktoberfest 2018 - DigitalOcean 用に開発したものだと思われます。 GitHubのタグを見ると(Topic: hacktoberfest2018 · GitHub )、hacktoberfestで2位 今年10月に公開されたのに関わらず既にStarが2000以上付いており、かなり勢いがあります
APIの新規作成 MyData画面からNewと書いてあるセレクトボックスを選択することで新しいAPIを作成できる。 Magicはウェブサービス版で使われている機能と同じで細かい設定をすることができない。 そこで今回はExtractorを選択してより詳しいルールのAPIを作成する。 ちなみにClassic ExtractorとAuthenticated Extractorについてはまだよく分かっていない。 APIの実装については動画やヘルプを参考にしながら行うと良い。 丸投げしているようであるが筆者もまだ分かっていないところが非常に多いため、そちらのほうが確実である。 ここで自動取得モードが適応できれば非常にラッキーである。 ちなみに筆者は確実に行うために、CSSやJSを切って、取得したい部分を2行以上ドラッグで選択というまどろっこしい手段を用いたりした。 なおスパナボタンであるadvanc
はじめに 2017/10/27 追記 本記事はAmazon API Gatewayがリリースされて間もない時期に執筆されたものです。現在、Amazon API GatewayではCORSを有効にする設定が追加されています。CORSを有効にするには、対象のリソースの「Actions」ドロップダウンメニューから「Enable CORS」を選び、設定を行う必要があります。CORSを設定する際には公式の手順と照らし合わせながらお読みいただけますようお願いいたします。 http://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/how-to-cors.html CORS (Cross-Origin Resource Sharing)とは、ブラウザがオリジン(HTMLを読み込んだサーバのこと)以外のサーバからデータを取得することで
一人アドベントカレンダーの一日目です(違 10月にニコニコ動画から『スナップショット検索API』というのが出ていたので触ってみました 毎日朝5時の時点のデータのスナップショットから検索できるAPIでニコニコ動画のコンテンツを解析する目的で検索/取得する際に利用できますとのことです ニコニコ動画 『スナップショット検索API』 ガイド APIはhttp://api.search.nicovideo.jp/api/snapshot/に以下のようなJSONをPOSTする方式になっています(各々フィールドの詳細はドキュメントを参照) { "query" : 検索キーワード "service" : 検索対象サービスリスト, "search" : 検索対象フィールドリスト, "join" : 取得対象フィールドリスト, "filters" : フィルタ指定リスト(オプション), "sort_by" :
Facebookでサポートされているロケールと言語Facebookが使用する言語の形式はll_CCで、llは2文字の言語コードを、CCは2文字の国コードをそれぞれ表します。たとえば、en_USは、アメリカ英語を表します。多くの ISO言語と国コードをサポートしています。 ただし、例外としてar_ARとes_LAの2つはISO基準に従いません。Facebookでは、これらのコードをアラビア語とスペイン語の包括ロケールを示すために使用しています。スペイン語については、Facebookでは、いくつかの特殊ローカライズをサポートしています。 ソーシャルプラグインとJavaScript SDKによるローカライズウェブサイトやアプリをFacebookに統合する最も基本的な方法は、ソーシャルプラグインを追加することです。ソーシャルプラグインには、利用者があなたのウェブページやアプリに対して簡単にアクショ
サーバー側でのアクセストークンの取得は、認証ダイアログへのリダイレクト処理やリダイレクト後のcode処理など、若干面倒な処理が多いです。 そこでjavascript SDKの使用によって、クライアントサイドで画面遷移なしで簡単にアクセストークンの取得、apiアクセスする方法を紹介したいと思います。 (function(d){ var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/ja_JP/all.js"; ref.parentNode.in
詳細 - Bing Search API | Microsoft Azure Marketplace たとえばウェブ検索で、レスポンスをJSON、キーワードを「sushi」とするには、 https://api.datamarket.azure.com/Bing/Search/v1/Web?$format=json&Query=%27sushi%27 とします。またQueryにはBing検索の演算子を用いられ「sushi site:example.com」のような指定も可能です。 ブラウザからAPIのURLへリクエストするとユーザー名とパスワードを要求されますが、ユーザー名は省略しパスワードにアカウントキーを指定すれば、レスポンスを得られます。 制限 APIの利用は1月あたり5000トランザクション (5000ページ分のリクエスト) に制限されており、それを越えて利用するには料金の支払が必要
スマートウォッチはさまざまなブランドから発売されており、とても注目を集めています。しかし、具体的にどのような機能があるのか分からない方もいるでしょう。また数多くの種類があり、どれを選ぶか迷う方も多いですよね。そこで今回は、スマートウォッチの基本的な機能や、おすすめのブランド・商品についてご紹介します。 #健康管理 多くのスマートウォッチには、歩数を計測する機能があります。その機能を使用すれば歩数やカロリーなどが計算できて、健康管理に役立つでしょう。 #通知機能 メールやSNS(Faceboook、Twitter、Instagramなど)の通知を受け取ることができます。会議中や食事中などでも気軽に確認できるでしょう。 #電子マネー決済 対応しているスマートウォッチであれば、さまざまな電子マネー決済が使用できます。財布を取り出さなくてもいいため非常に便利です。 #音楽再生 スマホをカバンやポケ
Install the SDK To install the Facebook PHP SDK run the following command (this example uses composer) in a terminal window on your server, in your project folder: my-server:my-php-project$ composer require facebook/graph-sdkThis command will install the SDK in the /vendor folder of your project. my-server:my-php-project$ ls -al vendor/facebook/ total 0 drwxr-xr-x 3 khoover 1876110778 96 Dec 12 10
Facebookアプリを作る機会があったので色々と調べていたのですが、OAuth認証のコールバックにはlocalhostを指定出来ないみたいでちょっと困った。 ので、hostsを書き換えて無理やりやりましょうって事でやってみたら上手く行きました。 hostsの設定は以下のとおり。 コレを/etc/hostsのどっかに書いておいて下さい。 127.0.0.1 local.examples.com で、Facebookアプリの設定。 【アプリのドメイン】の所に上記で設定したドメインを追加。 下の方にある【ウェブサイト】のところも忘れずに。 後は設定したドメインにアクセスすれば問題なく動きますよ。 ついでにキャンバスページも同様に出来るので設定してみると幸せになれるかも。 余談ですが、Djangoのテストサーバーがlocalhost:8000で動いてるんですけども、Nginx使ってリバースプロキ
以前の投稿で翻訳サービスのMicrosoft Translator APIの使い方を書いたのだが、書いた直後にAPIの利用方法が変わってしまっていた。久々に使う機会があったので再度調査し使い方をまとめてみた。 まずはWindows Azure Marketplaceへの登録が必要となる。 以下のURLより「Microsoft アカウント」でサインインをする。 このアカウントは、以前はWindows Live IDと呼ばれていたものと同じではないかと思う。自分はそのIDでログインできた。持っていなければログイン画面の新規登録のリンクをたどって作成しする。 Windows Azure Marketplaceを初めて使うのであればいろいろ聞かれるので必要な情報を入力して登録を完了させる。 Windows Azure Marketplace http://datamarket.azure.com/
Enterprise x HTML5 Web Application Conference 2014の発表資料です。Read less
「Rubyによるクローラー開発技法」で付録か何かで書こうか悩んだ末に書かなかったのが、kimonolabsの話です。kimonolabsは、クローラー/スクレイピングをオンラインで実行できるWebサービス(SaaS)です。クローラー本を書いておいて何ですが、9割の人は自分でクローラーを作らずに、この手のサービスを利用すれば事足りると思います。(書かなかった理由は、Ruby縛りサービスの継続性とスケジュールの問題です。主に最後) kimonolabsとは? kimonolabsは、先述のとおりWebスクレイピングをしてくれるSaaSです。会員登録してChromeの拡張をいれれば、すぐに使えるようになります。一般的に、Webスクレイピングする場合は、次のような手順が必要です。 対象ページのダウンロード ダウンロードしたページから、特定の箇所を抜き出す 抜き出したデータの保存 対象ページのダウン
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く