Python extracts the number of tweets reproduced in Sina Public Weibo, username, content

Source: Internet
Author: User
Tags count

CODE:

#!/usr/bin/python   
#-*-coding:utf-8-*-  
      
' Created on 
2014-7-4 
@author: guaguastd 
@name: Find _popular_retweets.py 
'
          
if __name__ = = ' __main__ ':  
      
    #import json  
          
    # get WEIBO_API to access Sina API From  
    sinaweibologin import sinaweibologin  
    Sinaweiboapi = Sinaweibologin ()  
          
    # import Sinaweibo  
    From Sinaweibo import Popularsinaweibo  
          
    # import sinaweobostatuses from  
    sinaweibostatuses Import Publictimeline  
          
    # import Sinaweiboformat from  
    sinaweiboformat import Weiboprettyformat  
          
    # get the new 200 Weibo  
    statuses = Publictimeline (sinaweiboapi) Weibos = Popularsinaweibo  
          
    (statuses)  
    counts = 100
    Weiboprettyformat ([' Count ', ' Screen Name ', ' Text '], Weibos, counts)

Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/

Result:

+-------+--------------------------------+--------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------+  
| Count | Screen Name |                                                                                                                                                                                                                                                Text  
| +-------+--------------------------------+--------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------+  
| 0 |       Ming 1v1                   | "Violent football shot" is a classic football shooting game. The game is very simple, also very classic. Do you like football? Did you have a good shot? Easy to start shooting games, hit target goals to get extra points and rewards.  
Who scored the most is the best football player. | | 0 | Mar General Masa | One day, a young child, in the party to dinner, asked his father a question: "Dad, you guessed a riddle, said a person holding five cents to go to the three women, you say this event mathematical symbol?" Everyone thought good [lovely] half a day, some said: "is a question mark", some say is "exclamation"!  
Everyone in the instead focusing, the waiter suddenly came out a "absolute value"! | | 0 | Liang Liang fashionable Tide series Collocation Control Shop |                                                                                                                                                                                Very small fresh cotton Linen cotton Series ~ Like to please praise ~~>>>>>> like to point here: Http://t.cn/RvRBEdO  
| | 0 | Knight of the Earthquake |  "Murach Weibo announces transfer to Qatar" is finally leaving!                                                                                                                                                                                                          Http://t.cn/RvF4AHx              | | 0 | Rain Falls Qingjian |                                                                                                                                                                                           [HEE] European Station 2014 summer new hollow Fish-style female sandals leather high heel fine with pointed Sandals 33 small Code Http://t.cn/RvCLA5L  
| | 0 | The goddess of the South-ho | Listen to me Sing "The Moon Represents My Heart", defeated 62% of the people in the country.                                                                                                                                                                                    Audition Address >> Http://t.cn/RvFM7ar (through #唱吧 # Recording)  
| | 0 | Chen Dasheng | Did a night to be hunted down the dream, run the uncle really do not want to run, woke up. [Don't bother me] hate my habit of sleeping late and getting up early!                                                                                                                                                              [Thunderbolt] Http://t.cn/RvrnFFm  
| | 0 | Mirror-Mirror Warm tree |                                          We all want to love to see the more thorough, but do not want, always will be hurt, the love of pure luster oblivion.                                                                                                                          | | 0 | Xin _xzx | Five years a generation gap ...                                                                                                                                                                                                               Next to learn driving 96 years Boy said =_= Http://t.cn/RvFM7te  
| | 0 | Gold in Dazzle |                                                                                                                                                                                               Hee father's Day genuine old men's Sandals Leisure beach sandals man real leather wallet sandals beach shoes Cool Mop HTTP://T.CN/RVCYVDF  
| | 0 | Batti 99 | Once I visited my classmate's house and found that he was frowning at the monitor and complaining that today's science fiction is getting harder to understand. Originally he is using a software full screen Chinese function to see English version Macross. At first glance, its wording is strange, it is difficult to understand, under the scrutiny, has suddenly dawned.  
It turns out that this baby software has translated all the "space" @56 jokes | | 0 |           Celestis to the red and green fashion control    |                                                                                                                                                                                             Like a little praise ~~>>>>>> like to point here: http://t.cn/RvRFSVe  
| | 0 | Chasing the footprints of Sanmao |                                                                                                                                                                                                                                             Start with breakfast in the morning  
| | 0 | Lost Pig HL |                                                                                                                                                                                                                                            #应用广场签到 #  
| | 0 | Regulation 1 Small 1 | "Feishazoushi 6-wheel Mercedes-Benz G63 AMG45 € Sales" recently, Mercedes officially announced 201The price of the 4 G63 AMG 6x6, Germany, has been taxed at 451,010 euros. The desert beast, with an annual limit of 20 to 30 units, will begin delivery in early 2014.  
Mercedes-Benz is determined to produce only the left rudder model and will not be available for sale in the United States, Canada and Mexico. | 0 | Fujimori also |                                                                                                                                                                                          [laughs haha] thousand posture hundred bags 2014 New Gold female package European and American trend Vogue lip printing ox bag shoulder bag Http://t.cn/RvCUiAI  
| | 0 | Ying-language Zheng | The best wedding photography in the country "1, Shanghai sentiment: Waibaidu Bridge 2, the Yangtze River delta taste:" Sleep in the water of Zhouzhuang 3, the rhythm of the liquid, the West Creek Wetland 4, Lijiang on the side of the romantic: Yangshuo 5, the ends of the world's promise; Hainan 6, petty bourgeoisie: (In the sky under the Stars for the beloved children put on gorgeous wedding gown, record sweet moments, promise a better future ...)  
) | | 0 | Sue DS001 |                                                                                                                                                                                              Forward shorts, male Korean version, casual pants, men's summer, pants, slacks, suits, http://t.cn/RvCy5Z1  
| | 0 | Reading of the Belly black | [imprinting] If a man can tolerate your flaws,, when you are in a bad mood, still spoil you, in your appearance not only when still kissing you, such a man is worth to love.  
| | 0 | Geng Strawberry and great Fortune Gold | The Blue sky is the sun, after a hard are sweet, failed when experience, and success is brilliant. Under the blue sky is the sunshine, after the hardship is sweet, failure is the experience, success is                                                                                                                          Brilliant.  
| | 0 | Ching |                                                                                                                                                                                                                                            #应用广场签到 #  
| | 0 | Fashion Match Show |                                                                                             Like to please praise ~~>>>>>> like to point here: Http://t.cn/RvE2OUN                                                                                                                          | | 0 | American Tide Control Vending Machine UL |                                                                                                                                                                                               Beautiful shoes ~~>>>>>> like to point here: http://t.cn/RvEOdfx  
| | 0 | US Online Consultant |                                                                                                                                                                                 Vacation friends look over, look over, look over ~~>>>>>> like to point here: http://t.cn/RvE5AGc  
| | 0 | Beautiful girls and boys love Match |                                                                                                      Summer is already on the new ~ now must be the beginning of the cabbage and look good ~~>>>>>> like to point here: HTTP://T.CN/RVETEMD                                                                                             | | 0 | Advice to a stingy shop |                                                                                                                                                                                                                             Life, whether happy, often not depend on how much you have  
| | 0 | Purple Elf Happy K | #百万德迷 # Strong Support, hope good luck to me, let me a bar, too look forward to.                                                                                                                                                                                                          http://t.cn/RvOyv8k  
| | 0 | Purple Glass Maple Yue | Defeated the present witch "toilet in the flower"!                                                                                                                                                                                                                       Http://t.cn/zYTNHzs #神女控  
| | 0 | DressingBeauty control Beauty Skin Care |                                                                                                                                                                                     Beautiful short Sleeve T-shirt ~ Like a little praise ~~>>>>>> like to point here: Http://t.cn/RvEvM3V  
| | 0 | Wear and Clothing hot match _ |                                                                                                                                                                          Summer is already on the new ~ now must be the beginning of the cabbage and look good ~~>>>>>> like to point here: HTTP://T.CN/RVETEMD  
| | 0 | Fashion control guide for clothes and Tide |                                                                                                                                                                          Summer is already on the new ~ now must be the beginning of the cabbage and look good ~~>>>>>> like to point here: HTTP://T.CN/RVETEMD  
| | 0 | The knowledge of fresh control in the beauty of clothes and Tide | Like a little praise ~~>>>>>> like to point here: http://t.cn/rvrggkt  
| | 0 | Dress Fashion Match Division Eddy |                                                                                                                                                                                      Casual dress up, with a good ride ~~>>>>>> like to point here: Http://t.cn/RvRHuBP  
| | 0 | Wish the world good people happy and happy | Share self-sufficiency I a year "which men can not be a love object?"  -Recently there are three news on the internet about the killing of emotional disputes: July 9 18:51 P.M., Jinan City Industrial South Road, near the building of eight innings, a man with a knife killed 3 ...  
(from @ Headline blog) http://t.cn/RvFM7Ik | | 0 | See beautiful map _ Learn beautiful Control |                                                                             TA home summer features small t pretty good-looking, do not pick the color of the candy color, put on a good fresh ~~>>>>>> like dot here: Http://t.cn/RvESJTW                                                                                                            | | 0 | The Summer password |                                                                                                                                                                                                                    Contend in the present, not for who change a touch of scenery, but also good for their own life of the movement.  
| | 0 | Hundred Love Baby |                                                                                                                                                                                           [Winking] College wind cowhide female backpack 2014 New Korean version of the trend of women and girls shoulder bag original small backpack fashion real leather bag http://t.cn/RvCUMKe  
| | 0 | Does it make sense to be crazy | #37大天使之剑代言人 # Korea goddess Portrait endorsement 37 "Archangel of the Sword"! Who is the most beautiful Archangel in your heart?                                                                                                                                                                              Http://t.cn/RvgU4E3  
| | 0 |    Male Girl dress Temperament Control Academy       |                                                                                                                                                                               This small t is good, casual style, price is not expensive ~~>>>>>> like to point here: Http://t.cn/RvEfd4D  
| | 0 | User UW2EOEQ2FK | #决战巴西 # Germany against Argentina, I predict Germany wins, Hao throws 1000, I want to win bonuses, I want to go to Brazil.                                                                                                                                                                    @ Pay Treasure Wallet HTTP://T.CN/RVX8JB1  
| | 0 | User Ub0rkur1yc | #掌阅iReader阅读分享 # Boredom is a shame, look at this "rebirth of the Return of the Woman" Bar!  Make your Life rich!                                                                                                                                       Click for free download-->HTTP://T.CN/RVDY3GJ share from @ Palm Read Ireader  
| | 0 | User 5204946377 | "Qin Moon" broken fought million, do the qin time overlord!                                                                              Http://t.cn/8FEVieV                                                                                                                          | | 0 | User 5133826420 | #围观世界杯领现金 # to the power of the micro-BO World Cup welfare crazy Rob ing~ watching the World Cup can also receive cash red envelopes, this thing ordinary people I do not tell him oh ~ Little friends come to join!                                                                            100% Jackpot, every day there are 4999 big prizes waiting for the small partners, in case of the Jackpot ~ [Proud to laugh] Http://t.cn/RvtNRlR  
| | 0 | User 5050621573 | "Gemini's 10 Big advantages" 1, Gemini is the most versatile constellation, 2, EQ Super high, people know how to adapt; 3, resourceful, responsive; 4, able to gain insight into others ' hearts; 5, slick, good at communication; 6, full of vitality, know the truth of contentment; 7, good at communication, with the potential of diplomats  
8, know how to advance and retreat, a sense of propriety, 9, adaptability is strong, 10, humorous, and life has fun. | | 0 | User 4133369820 | The family raised a rabbit, feed it cabbage every day. That day home a look, the rabbit pressed a bone in the gnawing relish, hence great surprise. Wife in the side cloud light wind Clear said: "Who says rabbits only like to eat cabbage radish?"                                                                                                           It was because of the hard life, the meat ...  
| | 0 | Careers-Teachers |                                                                                               Overnight in the spring city, but the roar of a night machine, the construction of beautiful spring City, from my start, noisy point, this is not a thing!                                                                                                          | | 0 |  Sweet Yo-Yo-nina |                                                                                                                                                                                      Share OneRepublic's single "Counting Stars" Http://t.cn/RvFM79C (from @ NetEase cloud music)  
| | 0 | Shanyan, the Hermit | #新浪邮箱 # Boiling Brazil, the winner "mail" You--draw a prize, guess the outcome, for the World Cup cry! Did you get a bonus?                                                                                                                                                                                      Http://t.cn/RvaHyQq  
| | 0 | Ling-Lemon Tea | I heard that the market will strike, then I am not a fake? Playboy                                                                                                                                                                                                                                         Playboy  | | 0 | Wang Hongyue | Before liquor can drink a bottle more, beer is not a specific number of children, but from today onwards I decided not to drink!                                                                                                                                   Do not die will not die, quit, anyway, there is no addiction, just hope that people do not drink when you seduce me!  
| | 0 | Wang Dejiong |                                                                                                                                                                                                                                   If True love, time and distance are not obstacles.  
| | 0 | Solo Love Explosion |                                                                                                                                                                                             Like a little praise ~~>>>>>> like to point here: http://t.cn/RvELQpt  
| | 0 | Love Street Beat, Beauty Tide control |                 Like a little bit of praise, ~~>>>>>> like this: http://t.cn/RvEQwpy                                                                                                                          | | 0 | Love Heng Bao Son | Kiss My Baby.

Author: csdn Blog guaguastd

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.