简体   繁体   English

使用Nokogiri解析源html时出现问题

[英]Trouble with parsing source html with Nokogiri

I'm trying to use nokogiri to select a DOM element but it seems to be returning an empty array. 我正在尝试使用nokogiri选择DOM元素,但它似乎返回一个空数组。

I run this code: 我运行这段代码:

require "open-uri"
require "nokogiri"

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

and it returns the whole source code parsed by Nokogiri. 并返回由Nokogiri解析的整个源代码。

However, when I run 但是,当我跑

doc.css(".stream-tweet")

it returns an empty array. 它返回一个空数组。 .stream-tweet is a class for multiple div elements at http://twitter.com/#!/ladygaga that I found by inspecting the source code. .stream-tweethttp://twitter.com/#!/ladygaga上多个div元素的类,我通过检查源代码发现了它。

What's going on here? 这里发生了什么?

Because there is no div element with stream-tweet class if you look at doc . 因为如果您看doc ,则没有stream-tweet类的div元素。
That div loads afterwards with AJAX request to twitter api. 然后,该div会向Twitter api加载AJAX请求。

@NARKOZ has the correct answer to your question about why what you're trying to do isn't working. @NARKOZ可以正确回答您有关为什么您尝试执行的操作无效的问题。 You should accept that answer. 您应该接受该答案。

To solve your problem, try this: 要解决您的问题,请尝试以下操作:

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 RT@GSp0nz: @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!"]

Here's what the whole JSON looks like as a Ruby Array of Hashes (truncated for Stack Overflow): 这是作为散列的Ruby数组的整个JSON的样子(由于堆栈溢出而被截断):

[{"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 RT@GSp0nz: @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},

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM