2011-07-21 19 views
1

nokogiriを使用してDOM要素を選択しようとしていますが、空の配列が返されているようです。Nokogiriでソースhtmlを解析する際の問題

私はこのコードを実行します。

require "open-uri" 
require "nokogiri" 

doc = Nokogiri::HTML(open("http://twitter.com/#!/ladygaga")) 

をし、それが鋸山によって解析され、全体のソースコードを返します。

私は

doc.css(".stream-tweet") 

を実行したときしかし、それは空の配列を返します。 .stream-tweetは、ソースコードを調べて見つけた複数のdiv要素のクラスです(http://twitter.com/#!/ladygaga)。

ここでは何が起こっていますか?

答えて

2

を見ると、stream-tweetクラスの要素がないので、div要素がありません。
その後、divはAJAXリクエストでtwitter apiにロードされます。

+0

方法にはあり'doc'をより良いものにする?また、正確に何を意味するのですか?実際のdivのロードは、後でjavascript twitter api経由で行います。 –

+1

nokogiriはajaxリクエストの結果を解析できないので、nokogiriでこれを行う方法はありません。なぜあなたはそれが必要なのですか?おそらくあなたはTwitterのAPIを使用することができます。 – NARKOZ

+1

@Justin NARKOZとは、「ソースを見る」(要素を検査しない)場合、存在すると主張するHTMLがそのURLの元のHTTP応答に存在しないことを意味します。代わりに、JavaScriptコードがサイトで実行され、最終的に11種類のXHR JSONリクエストの1つからコンテンツが受信されます。 JavaScriptは、クラスを使用してページ上の要素を動的に構築します。 Nokogiriは完全なWebブラウザではなく、JavaScriptを実行しません。 – Phrogz

1

@NARKOZは、あなたがしようとしていることが機能していない理由について、あなたの質問に対して正解です。あなたはその答えを受け入れるべきです。

あなたの問題を解決するために、これを試してみてください。

ここ
require 'open-uri' 
require 'json' 
require 'pp' 

gaga = JSON.parse(open('http://api.twitter.com/1/statuses/user_timeline.json?include_entities=1&include_available_features=1&contributor_details=true&include_rts=true&user_id=14230524').read) 

pp gaga.map{ |tweet| tweet['text'] }[0..3] 

#=> ["Here's my LIVE radio performance on the Howard Stern Show! http://bit.ly/pighVL\"", 
#=> "Thanks baby. I'm a die hard monsterfan [email protected]: @ladygaga 's album speaks to me more than any other album ever. #diehardfan", 
#=> "http://twitpic.com/5s4f2h - Just left @HowardStern, rockers with long hair have a sweetspot for girls like me. He was a doll. :)", 
#=> "SURPRISE MONSTERS! You can find a link to a more readable format of my V Mag Pop Culture Column on http://t.co/ekIJBXo My new blog!"] 

全体JSONは(スタックオーバーフローのために切り捨て)ハッシュのRubyの配列として次のようになります。

[{"in_reply_to_status_id"=>nil, 
    "user"=> 
    {"time_zone"=>"Quito", 
    "friends_count"=>142497, 
    "protected"=>false, 
    "location"=>"New York, NY", 
    "is_translator"=>false, 
    "following"=>true, 
    "profile_use_background_image"=>true, 
    "name"=>"Lady Gaga", 
    "follow_request_sent"=>false, 
    "statuses_count"=>968, 
    "profile_background_color"=>"9AE4E8", 
    "url"=>"http://www.ladygaga.com", 
    "default_profile"=>false, 
    "verified"=>true, 
    "profile_background_image_url"=> 
    "http://a1.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "utc_offset"=>-18000, 
    "profile_background_image_url_https"=> 
    "https://si0.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "favourites_count"=>2, 
    "created_at"=>"Wed Mar 26 22:37:48 +0000 2008", 
    "profile_text_color"=>"333333", 
    "profile_image_url_https"=> 
    "https://si0.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "profile_image_url"=> 
    "http://a1.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "listed_count"=>208144, 
    "profile_sidebar_fill_color"=>"DDFFCC", 
    "description"=>"mother mons\u2020er\r\n", 
    "contributors_enabled"=>false, 
    "lang"=>"en", 
    "profile_background_tile"=>true, 
    "followers_count"=>11781463, 
    "screen_name"=>"ladygaga", 
    "id_str"=>"14230524", 
    "profile_link_color"=>"0084B4", 
    "id"=>14230524, 
    "default_profile_image"=>false, 
    "show_all_inline_media"=>false, 
    "geo_enabled"=>false, 
    "notifications"=>true, 
    "profile_sidebar_border_color"=>"BDDCAD"}, 
    "created_at"=>"Tue Jul 19 18:09:40 +0000 2011", 
    "geo"=>nil, 
    "in_reply_to_user_id"=>nil, 
    "favorited"=>false, 
    "text"=> 
    "Here's my LIVE radio performance on the Howard Stern Show! http://bit.ly/pighVL\"", 
    "in_reply_to_status_id_str"=>nil, 
    "entities"=> 
    {"user_mentions"=>[], 
    "urls"=> 
    [{"url"=>"http://bit.ly/pighVL", 
     "indices"=>[59, 79], 
     "expanded_url"=>nil}], 
    "hashtags"=>[]}, 
    "in_reply_to_screen_name"=>nil, 
    "in_reply_to_user_id_str"=>nil, 
    "place"=>nil, 
    "coordinates"=>nil, 
    "truncated"=>false, 
    "source"=> 
    "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\u00AE</a>", 
    "id_str"=>"93382007496769536", 
    "contributors"=>nil, 
    "retweeted"=>false, 
    "retweet_count"=>"100+", 
    "id"=>93382007496769536}, 
{"in_reply_to_status_id"=>nil, 
    "user"=> 
    {"time_zone"=>"Quito", 
    "protected"=>false, 
    "location"=>"New York, NY", 
    "contributors_enabled"=>false, 
    "following"=>true, 
    "profile_use_background_image"=>true, 
    "name"=>"Lady Gaga", 
    "default_profile_image"=>false, 
    "profile_background_color"=>"9AE4E8", 
    "url"=>"http://www.ladygaga.com", 
    "default_profile"=>false, 
    "verified"=>true, 
    "profile_background_image_url"=> 
    "http://a1.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "utc_offset"=>-18000, 
    "friends_count"=>142497, 
    "is_translator"=>false, 
    "show_all_inline_media"=>false, 
    "geo_enabled"=>false, 
    "favourites_count"=>2, 
    "created_at"=>"Wed Mar 26 22:37:48 +0000 2008", 
    "follow_request_sent"=>false, 
    "profile_text_color"=>"333333", 
    "profile_image_url"=> 
    "http://a1.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "profile_sidebar_fill_color"=>"DDFFCC", 
    "description"=>"mother mons\u2020er\r\n", 
    "lang"=>"en", 
    "statuses_count"=>968, 
    "profile_background_tile"=>true, 
    "followers_count"=>11781456, 
    "screen_name"=>"ladygaga", 
    "id_str"=>"14230524", 
    "listed_count"=>208145, 
    "profile_background_image_url_https"=> 
    "https://si0.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "profile_link_color"=>"0084B4", 
    "id"=>14230524, 
    "notifications"=>false, 
    "profile_sidebar_border_color"=>"BDDCAD", 
    "profile_image_url_https"=> 
    "https://si0.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg"}, 
    "created_at"=>"Tue Jul 19 17:51:11 +0000 2011", 
    "geo"=>nil, 
    "in_reply_to_user_id"=>nil, 
    "favorited"=>false, 
    "text"=> 
    "Thanks baby. I'm a die hard monsterfan [email protected]: @ladygaga 's album speaks to me more than any other album ever. #diehardfan", 
    "in_reply_to_status_id_str"=>nil, 
    "entities"=> 
    {"hashtags"=>[{"indices"=>[115, 126], "text"=>"diehardfan"}], 
    "user_mentions"=> 
    [{"name"=>"Lady Gaga", 
     "indices"=>[50, 59], 
     "screen_name"=>"ladygaga", 
     "id_str"=>"14230524", 
     "id"=>14230524}], 
    "urls"=>[]}, 
    "in_reply_to_screen_name"=>nil, 
    "in_reply_to_user_id_str"=>nil, 
    "place"=>nil, 
    "coordinates"=>nil, 
    "truncated"=>false, 
    "source"=> 
    "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\u00AE</a>", 
    "id_str"=>"93377358974812161", 
    "contributors"=>nil, 
    "retweeted"=>false, 
    "retweet_count"=>"100+", 
    "id"=>93377358974812161}, 
{"in_reply_to_status_id"=>nil, 
    "user"=> 
    {"time_zone"=>"Quito", 
    "protected"=>false, 
    "location"=>"New York, NY", 
    "listed_count"=>208144, 
    "following"=>false, 
    "profile_use_background_image"=>true, 
    "profile_background_image_url_https"=> 
    "https://si0.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "name"=>"Lady Gaga", 
    "profile_background_color"=>"9AE4E8", 
    "url"=>"http://www.ladygaga.com", 
    "profile_image_url_https"=> 
    "https://si0.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "default_profile"=>false, 
    "verified"=>true, 
    "profile_background_image_url"=> 
    "http://a1.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "utc_offset"=>-18000, 
    "contributors_enabled"=>false, 
    "favourites_count"=>2, 
    "created_at"=>"Wed Mar 26 22:37:48 +0000 2008", 
    "default_profile_image"=>false, 
    "profile_text_color"=>"333333", 
    "profile_image_url"=> 
    "http://a1.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "friends_count"=>142497, 
    "profile_sidebar_fill_color"=>"DDFFCC", 
    "description"=>"mother mons\u2020er\r\n", 
    "is_translator"=>false, 
    "show_all_inline_media"=>false, 
    "lang"=>"en", 
    "geo_enabled"=>false, 
    "profile_background_tile"=>true, 
    "followers_count"=>11781392, 
    "screen_name"=>"ladygaga", 
    "follow_request_sent"=>false, 
    "id_str"=>"14230524", 
    "profile_link_color"=>"0084B4", 
    "id"=>14230524, 
    "statuses_count"=>968, 
    "notifications"=>false, 
    "profile_sidebar_border_color"=>"BDDCAD"}, 
    "created_at"=>"Mon Jul 18 14:30:46 +0000 2011", 
    "geo"=>nil, 
    "in_reply_to_user_id"=>nil, 
    "favorited"=>false, 
    "text"=> 
    "http://twitpic.com/5s4f2h - Just left @HowardStern, rockers with long hair have a sweetspot for girls like me. He was a doll. :)", 
    "in_reply_to_status_id_str"=>nil, 
    "entities"=> 
    {"hashtags"=>[], 
    "user_mentions"=> 
    [{"name"=>"Howard Stern", 
     "indices"=>[38, 50], 
     "screen_name"=>"HowardStern", 
     "id_str"=>"246481013", 
     "id"=>246481013}], 
    "urls"=> 
    [{"url"=>"http://twitpic.com/5s4f2h", 
     "indices"=>[0, 25], 
     "expanded_url"=>nil}]}, 
    "in_reply_to_screen_name"=>nil, 
    "in_reply_to_user_id_str"=>nil, 
    "place"=>nil, 
    "coordinates"=>nil, 
    "truncated"=>false, 
    "source"=> 
    "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\u00AE</a>", 
    "id_str"=>"92964531315294209", 
    "contributors"=>nil, 
    "retweeted"=>false, 
    "retweet_count"=>"100+", 
    "id"=>92964531315294209}, 
{"in_reply_to_status_id"=>nil, 
    "user"=> 
    {"follow_request_sent"=>false, 
    "time_zone"=>"Quito", 
    "protected"=>false, 
    "location"=>"New York, NY", 
    "show_all_inline_media"=>false, 
    "following"=>true, 
    "geo_enabled"=>false, 
    "profile_use_background_image"=>true, 
    "name"=>"Lady Gaga", 
    "default_profile"=>false, 
    "profile_background_color"=>"9AE4E8", 
    "url"=>"http://www.ladygaga.com", 
    "verified"=>true, 
    "profile_background_image_url"=> 
    "http://a1.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "utc_offset"=>-18000, 
    "listed_count"=>208146, 
    "statuses_count"=>968, 
    "profile_background_image_url_https"=> 
    "https://si0.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "favourites_count"=>2, 
    "created_at"=>"Wed Mar 26 22:37:48 +0000 2008", 
    "profile_text_color"=>"333333", 
    "profile_image_url_https"=> 
    "https://si0.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "profile_image_url"=> 
    "http://a1.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "profile_sidebar_fill_color"=>"DDFFCC", 
    "description"=>"mother mons\u2020er\r\n", 
    "contributors_enabled"=>false, 
    "lang"=>"en", 
    "profile_background_tile"=>true, 
    "followers_count"=>11781425, 
    "screen_name"=>"ladygaga", 
    "default_profile_image"=>false, 
    "id_str"=>"14230524", 
    "friends_count"=>142497, 
    "profile_link_color"=>"0084B4", 
    "id"=>14230524, 
    "is_translator"=>false, 
    "notifications"=>false, 
    "profile_sidebar_border_color"=>"BDDCAD"}, 
    "created_at"=>"Mon Jul 18 11:24:18 +0000 2011", 
    "geo"=>nil, 
    "in_reply_to_user_id"=>nil, 
    "favorited"=>false, 
    "text"=> 
    "SURPRISE MONSTERS! You can find a link to a more readable format of my V Mag Pop Culture Column on http://t.co/ekIJBXo My new blog!", 
    "in_reply_to_status_id_str"=>nil, 
    "entities"=> 
    {"user_mentions"=>[], 
    "urls"=> 
    [{"url"=>"http://t.co/ekIJBXo", 
     "display_url"=>"tinyurl.com/3p42npn", 
     "indices"=>[99, 118], 
     "expanded_url"=>"http://tinyurl.com/3p42npn"}], 
    "hashtags"=>[]}, 
    "in_reply_to_screen_name"=>nil, 
    "in_reply_to_user_id_str"=>nil, 
    "place"=>nil, 
    "coordinates"=>nil, 
    "truncated"=>false, 
    "source"=>"web", 
    "id_str"=>"92917605253386241", 
    "contributors"=>nil, 
    "retweeted"=>false, 
    "retweet_count"=>"100+", 
    "id"=>92917605253386241}, 
{"in_reply_to_status_id"=>nil, 
    "user"=> 
    {"contributors_enabled"=>false, 
    "time_zone"=>"Quito", 
    "protected"=>false, 
    "location"=>"New York, NY", 
    "default_profile"=>false, 
    "following"=>false, 
    "profile_use_background_image"=>true, 
    "name"=>"Lady Gaga", 
    "profile_background_color"=>"9AE4E8", 
    "url"=>"http://www.ladygaga.com", 
    "is_translator"=>false, 
    "default_profile_image"=>false, 
    "verified"=>true, 
    "profile_background_image_url_https"=> 
    "https://si0.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "profile_background_image_url"=> 
    "http://a1.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "utc_offset"=>-18000, 
    "show_all_inline_media"=>false, 
    "favourites_count"=>2, 
    "created_at"=>"Wed Mar 26 22:37:48 +0000 2008", 
    "friends_count"=>142497, 
    "geo_enabled"=>false, 
    "profile_text_color"=>"333333", 
    "profile_image_url"=> 
    "http://a1.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "follow_request_sent"=>false, 
    "profile_sidebar_fill_color"=>"DDFFCC", 
    "description"=>"mother mons\u2020er\r\n", 
    "lang"=>"en", 
    "profile_background_tile"=>true, 
    "followers_count"=>11781014, 
    "screen_name"=>"ladygaga", 
    "profile_image_url_https"=> 
    "https://si0.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "id_str"=>"14230524", 
    "profile_link_color"=>"0084B4", 
    "id"=>14230524, 
    "listed_count"=>208145, 
    "statuses_count"=>968, 
    "notifications"=>false, 
    "profile_sidebar_border_color"=>"BDDCAD"}, 
    "created_at"=>"Mon Jul 18 10:35:37 +0000 2011", 
    "geo"=>nil, 
    "in_reply_to_user_id"=>nil, 
    "favorited"=>false, 
    "text"=> 
    "http://twitpic.com/5s1f29 - If you need a quick fashion read, here's my V Mag column for the month. This time we did a Triptych!", 
    "in_reply_to_status_id_str"=>nil, 
    "entities"=> 
    {"hashtags"=>[], 
    "user_mentions"=>[], 
    "urls"=> 
    [{"url"=>"http://twitpic.com/5s1f29", 
     "indices"=>[0, 25], 
     "expanded_url"=>nil}]}, 
    "in_reply_to_screen_name"=>nil, 
    "in_reply_to_user_id_str"=>nil, 
    "place"=>nil, 
    "coordinates"=>nil, 
    "truncated"=>false, 
    "source"=> 
    "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\u00AE</a>", 
    "id_str"=>"92905355444621313", 
    "contributors"=>nil, 
    "retweeted"=>false, 
    "retweet_count"=>"100+", 
    "id"=>92905355444621313}, 
{"in_reply_to_status_id"=>nil, 
    "user"=> 
    {"time_zone"=>"Quito", 
    "protected"=>false, 
    "location"=>"New York, NY", 
    "is_translator"=>false, 
    "following"=>true, 
    "profile_use_background_image"=>true, 
    "profile_background_image_url_https"=> 
    "https://si0.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "name"=>"Lady Gaga", 
    "follow_request_sent"=>false, 
    "friends_count"=>142497, 
    "profile_background_color"=>"9AE4E8", 
    "url"=>"http://www.ladygaga.com", 
    "default_profile"=>false, 
    "verified"=>true, 
    "profile_background_image_url"=> 
    "http://a1.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "utc_offset"=>-18000, 
    "show_all_inline_media"=>false, 
    "favourites_count"=>2, 
    "created_at"=>"Wed Mar 26 22:37:48 +0000 2008", 
    "profile_text_color"=>"333333", 
    "profile_image_url"=> 
    "http://a1.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "listed_count"=>208145, 
    "profile_sidebar_fill_color"=>"DDFFCC", 
    "description"=>"mother mons\u2020er\r\n", 
    "lang"=>"en", 
    "geo_enabled"=>false, 
    "profile_background_tile"=>true, 
    "followers_count"=>11780972, 
    "screen_name"=>"ladygaga", 
    "profile_image_url_https"=> 
    "https://si0.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "id_str"=>"14230524", 
    "statuses_count"=>968, 
    "profile_link_color"=>"0084B4", 
    "id"=>14230524, 
    "default_profile_image"=>false, 
    "contributors_enabled"=>false, 
    "notifications"=>false, 
    "profile_sidebar_border_color"=>"BDDCAD"}, 
    "created_at"=>"Sun Jul 17 22:50:49 +0000 2011", 
    "geo"=>nil, 
    "in_reply_to_user_id"=>nil, 
    "favorited"=>false, 
    "text"=> 
    "I'm live with @howardstern 2moro morning on Sirius XM. Big fan. Gonna sing my face off, and talk shit w the raddest Hair in radio. 8am EDT", 
    "in_reply_to_status_id_str"=>nil, 
    "entities"=> 
    {"hashtags"=>[], 
    "user_mentions"=> 
    [{"name"=>"Howard Stern", 
     "indices"=>[14, 26], 
     "screen_name"=>"HowardStern", 
     "id_str"=>"246481013", 
     "id"=>246481013}], 
    "urls"=>[]}, 
    "in_reply_to_screen_name"=>nil, 
    "in_reply_to_user_id_str"=>nil, 
    "place"=>nil, 
    "coordinates"=>nil, 
    "truncated"=>false, 
    "source"=> 
    "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\u00AE</a>", 
    "id_str"=>"92727984666066944", 
    "contributors"=>nil, 
    "retweeted"=>false, 
    "retweet_count"=>"100+", 
    "id"=>92727984666066944}, 
{"retweeted_status"=> 
    {"in_reply_to_status_id"=>nil, 
    "user"=> 
    {"time_zone"=>"Central Time (US & Canada)", 
     "protected"=>false, 
     "profile_image_url_https"=> 
     "https://si0.twimg.com/profile_images/1395256604/DSCN06191_normal.jpg", 
     "location"=>"USA", 
     "default_profile_image"=>false, 
     "show_all_inline_media"=>false, 
     "following"=>false, 
     "geo_enabled"=>true, 
     "profile_use_background_image"=>true, 
     "name"=>"John Marshall", 
     "contributors_enabled"=>false, 
     "profile_background_color"=>"709397", 
     "url"=>nil, 
     "is_translator"=>false, 
     "verified"=>false, 
     "profile_background_image_url"=> 
     "http://a1.twimg.com/images/themes/theme6/bg.gif", 
     "utc_offset"=>-21600, 
     "follow_request_sent"=>false, 
     "statuses_count"=>849, 
     "favourites_count"=>0, 
     "created_at"=>"Mon Mar 07 03:52:21 +0000 2011", 
     "friends_count"=>423, 
     "profile_text_color"=>"333333", 
     "profile_image_url"=> 
     "http://a0.twimg.com/profile_images/1395256604/DSCN06191_normal.jpg", 
     "profile_sidebar_fill_color"=>"A0C5C7", 
     "description"=> 
     "420 #BoardsofCanada #GLP #iamamiwhoami #M\u00FCtterMons\u2020re Say what you say, do what you do, feel what you feel, as long as it's real.", 
     "lang"=>"en", 
     "profile_background_tile"=>false, 
     "followers_count"=>583, 
     "screen_name"=>"Karczochy", 
     "listed_count"=>5, 
     "id_str"=>"261997342", 
     "profile_link_color"=>"FF3300", 
     "id"=>261997342, 
     "default_profile"=>false, 
     "notifications"=>false, 
     "profile_background_image_url_https"=> 
     "https://si0.twimg.com/images/themes/theme6/bg.gif", 
     "profile_sidebar_border_color"=>"86A4A6"}, 
    "created_at"=>"Sun Jul 17 21:36:45 +0000 2011", 
    "geo"=>nil, 
    "in_reply_to_user_id"=>nil, 
    "favorited"=>false, 
    "text"=> 
    "LOL. That's gonna be..interesting..RT @jeff1317 Howard Stern is back tomorrow and @ladygaga is a guest! Should make for great radio!", 
    "in_reply_to_status_id_str"=>nil, 
    "entities"=> 
    {"hashtags"=>[], 
     "user_mentions"=> 
     [{"name"=>"Jeff", 
     "indices"=>[38, 47], 
     "screen_name"=>"jeff1317", 
     "id_str"=>"22542097", 
     "id"=>22542097}, 
     {"name"=>"Lady Gaga", 
     "indices"=>[82, 91], 
     "screen_name"=>"ladygaga", 
     "id_str"=>"14230524", 
     "id"=>14230524}], 
     "urls"=>[]}, 
    "in_reply_to_screen_name"=>nil, 
    "in_reply_to_user_id_str"=>nil, 
    "place"=>nil, 
    "coordinates"=>nil, 
    "truncated"=>false, 
    "source"=> 
    "<a href=\"http://twitter.com/#!/download/ipad\" rel=\"nofollow\">Twitter for iPad</a>", 
    "id_str"=>"92709349004279809", 
    "contributors"=>nil, 
    "retweeted"=>false, 
    "retweet_count"=>"100+", 
    "id"=>92709349004279809}, 
    "in_reply_to_status_id"=>nil, 
    "user"=> 
    {"time_zone"=>"Quito", 
    "protected"=>false, 
    "profile_image_url_https"=> 
    "https://si0.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "location"=>"New York, NY", 
    "default_profile_image"=>false, 
    "show_all_inline_media"=>false, 
    "following"=>false, 
    "geo_enabled"=>false, 
    "profile_use_background_image"=>true, 
    "name"=>"Lady Gaga", 
    "contributors_enabled"=>false, 
    "profile_background_color"=>"9AE4E8", 
    "url"=>"http://www.ladygaga.com", 
    "is_translator"=>false, 
    "verified"=>true, 
    "profile_background_image_url"=> 
    "http://a1.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "utc_offset"=>-18000, 
    "follow_request_sent"=>false, 
    "statuses_count"=>968, 
    "favourites_count"=>2, 
    "created_at"=>"Wed Mar 26 22:37:48 +0000 2008", 
    "friends_count"=>142497, 
    "profile_text_color"=>"333333", 
    "profile_image_url"=> 
    "http://a1.twimg.com/profile_images/1239447061/Unnamed-1_normal.jpg", 
    "profile_sidebar_fill_color"=>"DDFFCC", 
    "description"=>"mother mons\u2020er\r\n", 
    "lang"=>"en", 
    "profile_background_tile"=>true, 
    "followers_count"=>11781095, 
    "screen_name"=>"ladygaga", 
    "listed_count"=>208145, 
    "id_str"=>"14230524", 
    "profile_link_color"=>"0084B4", 
    "id"=>14230524, 
    "default_profile"=>false, 
    "notifications"=>false, 
    "profile_background_image_url_https"=> 
    "https://si0.twimg.com/profile_background_images/203383875/Unnamed-1.jpg", 
    "profile_sidebar_border_color"=>"BDDCAD"}, 
    "created_at"=>"Sun Jul 17 21:38:16 +0000 2011", 
    "geo"=>nil, 
    "in_reply_to_user_id"=>nil, 
    "favorited"=>false, 
    "text"=> 
    "RT @Karczochy: LOL. That's gonna be..interesting..RT @jeff1317 Howard Stern is back tomorrow and @ladygaga is a guest! Should make for g ...", 
    "in_reply_to_status_id_str"=>nil, 
    "entities"=> 
    {"hashtags"=>[], 
    "user_mentions"=> 
    [{"name"=>"John Marshall", 
     "indices"=>[3, 13], 
     "screen_name"=>"Karczochy", 
     "id_str"=>"261997342", 
     "id"=>261997342}, 
     {"name"=>"Jeff", 
     "indices"=>[53, 62], 
     "screen_name"=>"jeff1317", 
     "id_str"=>"22542097", 
     "id"=>22542097}, 
     {"name"=>"Lady Gaga", 
     "indices"=>[97, 106], 
     "screen_name"=>"ladygaga", 
     "id_str"=>"14230524", 
     "id"=>14230524}], 
    "urls"=>[]}, 
    "in_reply_to_screen_name"=>nil, 
    "in_reply_to_user_id_str"=>nil, 
    "place"=>nil, 
    "coordinates"=>nil, 
    "truncated"=>true, 
    "source"=> 
    "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\u00AE</a>", 
    "id_str"=>"92709727896735745", 
    "contributors"=>nil, 
    "retweeted"=>false, 
    "retweet_count"=>"100+", 
    "id"=>92709727896735745}, 
+0

cool。あなたはどのようにCSSスタイリングを手に入れますか? –

+0

@Justinあなたは何をしようとしているか説明しましょう。あなたはどんなCSSスタイリングをしたいですか?あなたはTwitterの外観を偽ってマークアップしようとしていますか? – Phrogz

+0

基本的に私はサイトを頑張ろうとしています。私は彼らがそれを許可するとは思わない(彼らはJavaScriptを使ってiframeをバストする)、そして私はそれを回避する方法を見つけようとしている。 –

関連する問題