タンヤガー

27/06/2009

“ 

OS3.0でタンブラー系のアプリが死亡してるのとか見て思ったんだけど、スクレイピング系のアプリはスクレイピングパートを自前のサーバーに置いて、そこを経由するほうがいいのかなぁと思った。

スクレイピングのアルゴリズムをアプリの中にハードコードしてしまうと、HTMLの仕様が変わってしまったときに、迅速な対応ができない。修正版をAppleに提出しても1〜2週間かかってしまい、その間アプリは動くなってしまうので。

あとはそういうロジック部分をサーバに出しとくと、iPhone, Android, BlackBerryとかでクロスなアプリを作りやすいし、危機対応もしやすいのかなぁと思う。

 „

fladdict » スクレイピングはサーバー処理が安全かなぁ

内部実装の話なので特に外に向けてアピールするつもりはなかったのですが、tumblr gear r.1.2.0 でまさにその実装をしていたところなので、ちょっとびっくりしました。
fladdictさんの指摘と違うことをやろうとしているのは、スクレイピングの処理自体をサーバー側に乗せてしまうとスケールしないと思ったので、スクレイピングのエンジンをクライアント側に持ち、クライアントはメタデータをサーバー側から取ってきてスクレイピングする、という実装にしているところ。
すでにスクレイピング処理に使うメタデータのほとんどはサーバー側に配置できているのですが、もっと処理の抽象化やパラメーター化が必要だなあと思っています。
という実験中。

(via honishi) (via yaruo) (via gkojax) (via polog)

iviewも元々スクレイピングのためのメタデータ共有をしたい、というところから始まったもののひとつなのでスクレイプのルールは外から持ってきて実行を中でやろうと思っていましたがiPhone SDK Agreementをよく読んでたら3.3.2に

An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s).

というのがあって、もともと組み込まれているインタプリタを除いて、ダウンロードしたコードを解釈し実行するこことがNGだって書いてあるのを見つけてApple的にFlashがNGなのと同じ古い理由でweb2.0/radical trustがspoilされて本当にむかつくけどとりあえずレビュー通らなかったら作っただけむだになるのでひよってやめました。

どうせならそのメタデータの仕様とデータを公開/共有しませんか。誰かがメンテしてくれるようになりますよ。

(via ku)

そういう理由でレビューに通らないことがあるんですね。知りませんでした。これでレビュー NG だったら悲しいですね。

それで、メタデータの公開はぜひしたいと思います。(見る人には見ればわかる)こんな(汚い)ものを公開していいのなら、、という前提付きなのですが。。正直、正規表現の固まりです。xml, dom, xpath あたりでもっとスマートにできるのではないかと思いましたが、評価する時間がなく既存の実装を延長する形でこの実装になってしまいました。この方が柔軟に切り貼り(スクレイピング)できるだろうということで自分で自分に言い聞かせています。

今度是非いろいろ相談に乗っていただければ助かります。

# というところで、公式 tumblr アプリがどんどん便利になってきているので、tumblr gear は早晩お役御免になる日が来ると思っており、現在の開発モチベーションは「技術的興味」がメインとなっていることも付け加えさせていただきます。

(via honishi)

たぶんAppStoreの代替として機能する物はだめというのが3.3.2の意図だと思うので黙ってれば普通に通ると思います。正規表現でも何でも公開されていればきっとだれかがなんとかしてくれますよ!

(via ku)

  1. pngnq reblogged this from otsune
  2. areha reblogged this from kanal
  3. tk78 reblogged this from kanal
  4. morygonzalez reblogged this from kanal
  5. kanal reblogged this from ku
  6. tsukamoto reblogged this from ku
  7. yksk reblogged this from ku
  8. macotoi reblogged this from ku
  9. savonneries reblogged this from slicks
  10. oosuka reblogged this from ku
  11. seashore reblogged this from otsune
  12. tfujiki reblogged this from ku
  13. polog reblogged this from ku
  14. yager reblogged this from ku
  15. slicks reblogged this from ku
  16. tdrk reblogged this from ku
  17. tanukian reblogged this from ku
  18. manamanmana reblogged this from ku
  19. comsmet reblogged this from ak47
  20. ku reblogged this from honishi
  21. tumbtumb reblogged this from omasayan
  22. stomita reblogged this from ku
  23. aya18 reblogged this from ichimonji
  24. macotoi reblogged this from honishi
  25. sugizou reblogged this from reretlet
  26. macotoi reblogged this from otsune
  27. reretlet reblogged this from markie
  28. gorouzaemon reblogged this from syoichi
  29. lattata reblogged this from syoichi
  30. markie reblogged this from syoichi
  31. syoichi reblogged this from ku
  32. gungle reblogged this from otsune
  33. neo-shocker reblogged this from lagash
  34. showyou reblogged this from otsune
  35. cube99 reblogged this from otsune
  36. youkeyx2 reblogged this from takku
  37. mituhime reblogged this from otsune
  38. lagash reblogged this from otsune
  39. tekkoc reblogged this from otsune
  40. takku reblogged this from otsune
  41. taketin reblogged this from otsune
  42. ichimonji reblogged this from otsune
  43. key1 reblogged this from otsune
  44. gtokio reblogged this from ku
  45. masaka reblogged this from otsune
  46. k2low reblogged this from otsune
  47. lotaki reblogged this from otsune
  48. komatak reblogged this from katsuma
  49. otsune reblogged this from omasayan
  50. takeoba reblogged this from honishi
  51. world9-1 reblogged this from yaruo
  52. honishi reblogged this from ku
  53. takaakik reblogged this from ku
  54. ak47 reblogged this from ku
  55. ku reblogged this from polog and added:
    というのがあって、もともと組み込まれているインタプリタを除いて、ダウンロードしたコードを解釈し実行するこことがNGだって書いてあるのを見つけてApple的にFlashがNGなのと同じ古い理由でweb2.0/radical...
  56. katsuma reblogged this from polog
  57. polog reblogged this from gkojax
  58. electrikt reblogged this from yaruo
  59. cymbals21 reblogged this from nagas
  60. lunaryue reblogged this from nagas
  61. stomita reblogged this from honishi
  62. nagas reblogged this from gkojax
  63. wiggling reblogged this from vmconverter
  64. donpyxxx reblogged this from yaruo
  65. cube99 reblogged this from gkojax
  66. tam reblogged this from gkojax
  67. hisaruki reblogged this from gkojax
  68. babirons reblogged this from yaruo
  69. vmconverter reblogged this from clavier
  70. omasayan reblogged this from vmconverter
  71. vmconverter reblogged this from clavier
  72. clavier reblogged this from yaruo
  73. quote-list reblogged this from gkojax
  74. gkojax reblogged this from yaruo
  75. yaruo reblogged this from honishi
  76. honishi posted this
Tumblr » powered Sid05 » templated