Commits

pval...@pvalente-laptop  committed e08c1a7

voltei a rodar 5 vezes antes de tentar adicionar as pessoas

  • Participants
  • Parent commits 0e5cffb

Comments (0)

Files changed (3)

     # Lista de palavras que nĂŁo ficam bem no fim da frase.
     dispensaveis = ['e','a','o','de','da','do','na','no','para','pra','mas','se','que','como','porque']
     a = raw_answer[:last].split()
-    while a[-1] in dispensaveis:
-        a.pop(-1)
+    if a:
+        while a[-1] in dispensaveis:
+            a.pop(-1)
     return "%s%s" % (msg, " ".join(a))
 
 
     
     
     ultima_pergunta=''
+    cycle_count = 0
     while (True):
-        intervalo = random.randint(20,40)*2
+        intervalo = random.randint(25,40)*2
         print "Tempo: %d segundos..." % intervalo
         time.sleep(intervalo)
         feed = get_full_feed()
         
-        #checa se no feed tem pessoas novas
-        new_people = False
-        for update in feed['results']:
-            if update['from_user'] not in friends_list:
-                new_people = True
-                add_friend(api, update['from_user'])
-        if new_people:
-            friends_list = get_friends_list(api, force=True)
+        if cycle_count >= 5:
+            #checa se no feed tem pessoas novas
+            new_people = False
+            for update in feed['results']:
+                if update['from_user'] not in friends_list:
+                    new_people = True
+                    add_friend(api, update['from_user'])
+            if new_people:
+                friends_list = get_friends_list(api, force=True)
+            cycle_count = 0
+        else:
+            cycle_count += 1
         
         #TODO Iterar do Ăşltimo item do feed para o primeiro, checando se jĂĄ foi respondido.
         #     Se nĂŁo foi, responde e grava em algum lugar update_id e flag_respondida

File friends.pickle

 (lp1
-Vwal_limoli
+Vjennytangerine
 p2
+aVgreevin
+p3
+aVsullyvan_blue
+p4
+aVrcarneiro
+p5
+aVcarolda
+p6
+aVrafo_
+p7
+aViana
+p8
+aVbany
+p9
+aVsobresonhos
+p10
+aValeJohnny
+p11
+aVjoaodocaminhao
+p12
+aVshingowatanabe
+p13
+aVrenatoelias
+p14
+aVausoleil
+p15
+aVgi_martins
+p16
+aVnanyrox
+p17
+aVCamilaCat
+p18
+aVforeversyoung
+p19
+aVolier
+p20
+aVlucah
+p21
+aVraquelalmeida
+p22
+aVjustcintia
+p23
+aVblogdoxavier
+p24
+aVagostini
+p25
+aVpaiva_thiago
+p26
+aVcisoxp
+p27
+aVfrangossauro
+p28
+aVpalmergroove
+p29
+aVfabiosantos99
+p30
+aVpushingdaisies
+p31
+aVlebravo
+p32
+aVcristalk
+p33
+aVnitroglicerina
+p34
+aVAlelex88
+p35
+aVdessalita
+p36
+aVserginhotavares
+p37
+aValeh
+p38
+aVdorlyneto
+p39
+aVfelipesimon
+p40
+aVPorquinho
+p41
+aVdotflux
+p42
+aVamanda_leal
+p43
+aVteka_avari
+p44
+aVdorafael
+p45
+aVdanilopopeye
+p46
+aVRodOgrO
+p47
+aVluishpenha
+p48
+aVrodrigomilfont
+p49
+aVnegapreta
+p50
+aVjonatasongs
+p51
+aVlorylooove
+p52
+aVmskulpas
+p53
+aVmborgomani
+p54
+aVmahrcius
+p55
+aVrafaelcamilo
+p56
+aVsilviogois
+p57
+aVnubibella
+p58
+aVCharmQGP
+p59
+aVfabriciodolci
+p60
+aVsamarinacorrea
+p61
+aVgaygeeksolteiro
+p62
+aVmr_biglia
+p63
+aVjvgfranco
+p64
+aVbrenomaciel
+p65
+aVedugards
+p66
+aVViniciusc
+p67
+aVrq_tata
+p68
+aVbarbaragondim
+p69
+aVIncrivelt
+p70
+aVvynn
+p71
+aVrubinhu
+p72
+aVtommarques
+p73
+aVtalita_pereira
+p74
+aVmarifomin
+p75
+aVseguraberenice
+p76
+aVjanainamoyses
+p77
+aVlosis
+p78
+aVjessicapassos
+p79
+aVrodrigojames
+p80
+aVtoscano
+p81
+aVdgmike
+p82
+aVuchizawa
+p83
+aVluanahermann
+p84
+aVpixoxo
+p85
+aVcorbata1982
+p86
+aVgustavocardoso
+p87
+aVstellabrunet
+p88
+aVkakah
+p89
+aV_hans
+p90
+aVbge
+p91
+aV_sukys
+p92
+aVbarone
+p93
+aVeduardovollmond
+p94
+aVjoaopapa
+p95
+aVmarcelohenrique
+p96
+aVlipeg
+p97
+aVsetzerknight
+p98
+aVwal_limoli
+p99
 aVthaismello
-p3
+p100
 aVAnanista
-p4
-aVlimareis
-p5
-aVkxxx
-p6
-aVsweethome
-p7
-aVmarianneabreu
-p8
-aVphonetrio
-p9
-aVmari_onete
-p10
-aVfelipelobo
-p11
-aVleeiri
-p12
-aVbrunocaimar
-p13
-aVmyris
-p14
-aVfelipesantini
-p15
-aVglacial
-p16
-aValegomes
-p17
-aVnatalianambara
-p18
-aVfranksands
-p19
-aVerikaluthor
-p20
-aVelimafra
-p21
-aVfelipc
-p22
-aVpathaddad
-p23
-aVgustavolemos
-p24
-aVlidifaria
-p25
-aVmob_igormaia
-p26
-aVandersonwyzard
-p27
-aVnavelar
-p28
-aVfracazo
-p29
-aVTamosauskas
-p30
-aVandressafabris
-p31
-aVfunxo
-p32
-aVjpferreira
-p33
-aVvinisko
-p34
-aVlenonm
-p35
-aVmeuretrato
-p36
-aVfugita
-p37
-aVnandop
-p38
-aVlpouzada
-p39
-aVJimmyAndrade
-p40
-aVnitzoca
-p41
-aVInFog9
-p42
-aVrpmarsolla
-p43
-aVmagalyprado
-p44
-aVguzzmartins
-p45
-aVmanoelbr
-p46
-aVcarrapatoso
-p47
-aVmauro_baraldi
-p48
-aVcmilfont
-p49
-aVjonnyken
-p50
-aVleopinheiro
-p51
-aVgcirne
-p52
-aVhebertr
-p53
-aVpellegrino
-p54
-aVdonalilian
-p55
-aVbrunocarvalho
-p56
-aVyogodoshi
-p57
-aVpac_man
-p58
-aVmserrano
-p59
-aVmichellets
-p60
-aVedsonlcj
-p61
-aVAmendoeira
-p62
-aVandyzeo
-p63
-aVgilbertojr
-p64
-aVklaudin
-p65
-aVlucieide
-p66
-aVsahelizabeth
-p67
-aVcahcarola
-p68
-aVfernandoluz
-p69
-aVrbp
-p70
-aVrbernardelli
-p71
-aVpergunta
-p72
-aVdivless
-p73
-aVtiedyepoa
-p74
-aValined
-p75
-aVsilviotanaka
-p76
-aVloveology_x
-p77
-aVLiliabdalla
-p78
-aVeshiota
-p79
-aValickel
-p80
-aVgunter77
-p81
-aVJuzix
-p82
-aVigordrey
-p83
-aVmarkun
-p84
-aVpedroturambar
-p85
-aVdanielcassiano
-p86
-aVsergiomaia
-p87
-aVlucmult
-p88
-aVboechat
-p89
-aVmeninaquejoga
-p90
-aVandressa_r
-p91
-aVpcalcado
-p92
-aViarana
-p93
-aVCronicaNet
-p94
-aVwillianmax
-p95
-aVmoskito
-p96
-aVparsifall
-p97
-aVpeleteiro
-p98
-aVmundosdalua
-p99
-aVvrsmn
-p100
-aVbiasouza
 p101
 a.

File updates.pickle

 (dp1
 Vnext_page
 p2
-V?page=2&max_id=1001465973&q=comofas
+V?page=2&max_id=1003650051&q=comofas
 p3
 sVrefresh_url
 p4
-V?since_id=1001465973&q=comofas
+V?since_id=1003650051&q=comofas
 p5
 sVresults
 p6
 p10
 sVtext
 p11
-V@fasassim comofas pra pausar a internet?
+V@comofas pra saber o que é o viagemdosrping.com.br?
 p12
 sVcreated_at
 p13
-VWed, 12 Nov 2008 02:49:30 +0000
+VThu, 13 Nov 2008 11:17:49 +0000
 p14
 sVprofile_image_url
 p15
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/62255420/twitter3_normal.jpg
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/59081395/rafael_normal.jpg
 p16
 sVto_user
 p17
-Vfasassim
+Vcomofas
 p18
 sVfrom_user
 p19
-VOneLag
+Vrcarneiro
 p20
 sVfrom_user_id
 p21
-I201065
+I18008
 sVto_user_id
 p22
-I2367550
+I1098004
 sVid
 p23
-I1001465973
+I1003650051
 sa(dp24
 Viso_language_code
 p25
 p26
 sVtext
 p27
-V@OneLag, vc precisa perguntar pro @fasassim comofas pra năo ficar angustiado com a internet. Com certeza ele tem uma boa resposta
+Vfoco e concentraçăo #comofas
 p28
 sVcreated_at
 p29
-VWed, 12 Nov 2008 02:46:12 +0000
+VThu, 13 Nov 2008 11:17:44 +0000
 p30
 sVprofile_image_url
 p31
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/60157722/pedro2008_normal.jpg
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/43730642/indicator_big_normal.gif
 p32
+sVfrom_user
+p33
+Vluanahermann
+p34
+sVfrom_user_id
+p35
+I14790
+sVto_user_id
+p36
+NsVid
+p37
+I1003649983
+sa(dp38
+Viso_language_code
+p39
+Vpt
+p40
+sVtext
+p41
+Vgrande oráculo twitteriano! o dia está um tédio! #comofas?
+p42
+sVcreated_at
+p43
+VThu, 13 Nov 2008 11:15:53 +0000
+p44
+sVprofile_image_url
+p45
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/60789800/twitter_normal.jpg
+p46
+sVfrom_user
+p47
+Vjonatasongs
+p48
+sVfrom_user_id
+p49
+I727824
+sVto_user_id
+p50
+NsVid
+p51
+I1003648443
+sa(dp52
+Viso_language_code
+p53
+Vpt
+p54
+sVtext
+p55
+V@thiagomartins, o que houve?? O espelho tava dentro do carrinho!!! #comofas
+p56
+sVcreated_at
+p57
+VThu, 13 Nov 2008 11:10:19 +0000
+p58
+sVprofile_image_url
+p59
+Vhttp://static.twitter.com/images/default_profile_normal.png
+p60
 sVto_user
-p33
-VOneLag
-p34
-sVfrom_user
-p35
-Vpedrovalente
-p36
-sVfrom_user_id
-p37
-I50376
-sVto_user_id
-p38
-I201065
-sVid
-p39
-I1001461425
-sa(dp40
-Viso_language_code
-p41
-Vpt
-p42
-sVtext
-p43
-VConsigo năo, universo. Comofas aqui com galáxias de medos eternos? EIN? Porra, meu.
-p44
-sVcreated_at
-p45
-VWed, 12 Nov 2008 02:34:18 +0000
-p46
-sVprofile_image_url
-p47
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/59994655/grayside_normal.jpg
-p48
-sVfrom_user
-p49
-Vwal_limoli
-p50
-sVfrom_user_id
-p51
-I1609096
-sVto_user_id
-p52
-NsVid
-p53
-I1001446080
-sa(dp54
-Viso_language_code
-p55
-Vpt
-p56
-sVtext
-p57
-Vtop top mtv foi tudo, comofas ter pais mega influentes///
-p58
-sVcreated_at
-p59
-VWed, 12 Nov 2008 02:33:14 +0000
-p60
-sVprofile_image_url
 p61
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/56772187/praiafaixagrandecortada_normal.jpg
+VThiagoMartins
 p62
 sVfrom_user
 p63
-Vthaismello
+Vcarol_correa
 p64
 sVfrom_user_id
 p65
-I980877
+I2366785
 sVto_user_id
 p66
-NsVid
+I29548
+sVid
 p67
-I1001444533
+I1003644193
 sa(dp68
 Viso_language_code
 p69
 p70
 sVtext
 p71
-VQuando eu morrer, quero deixar o meu corpo pra cięncia #comofas?
+Vterminar o trampo até as 10 comofas??
 p72
 sVcreated_at
 p73
-VWed, 12 Nov 2008 02:12:25 +0000
+VThu, 13 Nov 2008 09:14:33 +0000
 p74
 sVprofile_image_url
 p75
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/58434963/Ananias_normal.jpg
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/62280729/miavatarr_normal.jpg
 p76
 sVfrom_user
 p77
-VAnanista
+Vm4rloon
 p78
 sVfrom_user_id
 p79
-I267892
+I13559
 sVto_user_id
 p80
 NsVid
 p81
-I1001421324
+I1003555421
 sa(dp82
 Viso_language_code
 p83
 p84
 sVtext
 p85
-VQuero aprender mandarim, #comofas?
+VEngraçado que o dólar está em alta, mas falta dinheiro pra mim, #comofas, #medo
 p86
 sVcreated_at
 p87
-VWed, 12 Nov 2008 01:32:20 +0000
+VThu, 13 Nov 2008 08:46:48 +0000
 p88
 sVprofile_image_url
 p89
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/63884836/avatar2_normal.png
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/53394515/DSC-0181_normal.jpg
 p90
 sVfrom_user
 p91
-Vlenonm
+Vfabiosantos99
 p92
 sVfrom_user_id
 p93
-I191412
+I323597
 sVto_user_id
 p94
 NsVid
 p95
-I1001371857
+I1003534176
 sa(dp96
 Viso_language_code
 p97
 p98
 sVtext
 p99
-Vcomofas pra ligar pro afeganistăo ?
+VÉ necessário uma conta twitter só para o blog? #duvida  #comofas
 p100
 sVcreated_at
 p101
-VWed, 12 Nov 2008 01:26:18 +0000
+VThu, 13 Nov 2008 08:39:01 +0000
 p102
 sVprofile_image_url
 p103
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/60297300/BRAZIL_by_Oster_normal.jpg
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/53394515/DSC-0181_normal.jpg
 p104
 sVfrom_user
 p105
-Vbrunocaimar
+Vfabiosantos99
 p106
 sVfrom_user_id
 p107
-I609851
+I323597
 sVto_user_id
 p108
 NsVid
 p109
-I1001364783
+I1003528493
 sa(dp110
 Viso_language_code
 p111
 p112
 sVtext
 p113
-Vcomofas pra isso funcionar ?
+V"dá preguiça de viver pensar que eu to comendo um suco" HSDJFHDSJHF comofas eu tô rindo muito ;;
 p114
 sVcreated_at
 p115
-VWed, 12 Nov 2008 01:23:59 +0000
+VThu, 13 Nov 2008 08:00:26 +0000
 p116
 sVprofile_image_url
 p117
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/60297300/BRAZIL_by_Oster_normal.jpg
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/57602745/foto._152_normal.jpg
 p118
 sVfrom_user
 p119
-Vbrunocaimar
+Vtalkingpuppet
 p120
 sVfrom_user_id
 p121
-I609851
+I1159985
 sVto_user_id
 p122
 NsVid
 p123
-I1001361868
+I1003498677
 sa(dp124
 Viso_language_code
 p125
 p126
 sVtext
 p127
-VO som no Debian tá muito baixo, já reinstalei o Alsa e nada... #comofas?
+Vjá tou pilhado pro laurant hj ŕ noite #comofas?
 p128
 sVcreated_at
 p129
-VWed, 12 Nov 2008 01:16:16 +0000
+VThu, 13 Nov 2008 07:47:07 +0000
 p130
 sVprofile_image_url
 p131
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/63884836/avatar2_normal.png
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/63453617/spe_normal.jpg
 p132
 sVfrom_user
 p133
-Vlenonm
+Vspiceee
 p134
 sVfrom_user_id
 p135
-I191412
+I39907
 sVto_user_id
 p136
 NsVid
 p137
-I1001351859
+I1003488715
 sa(dp138
 Viso_language_code
 p139
 p140
 sVtext
 p141
-V@luizaaltino comofas/ O__O'
+Vqual é a opçăo certa: comível ou comestível #comofas
 p142
 sVcreated_at
 p143
-VWed, 12 Nov 2008 01:07:39 +0000
+VThu, 13 Nov 2008 05:58:12 +0000
 p144
 sVprofile_image_url
 p145
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/64068242/IMG_4095_normal.JPG
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/53394515/DSC-0181_normal.jpg
 p146
+sVfrom_user
+p147
+Vfabiosantos99
+p148
+sVfrom_user_id
+p149
+I323597
+sVto_user_id
+p150
+NsVid
+p151
+I1003399396
+sa(dp152
+Viso_language_code
+p153
+Vpt
+p154
+sVtext
+p155
+Vmas comofas com a fome de madrugada?
+p156
+sVcreated_at
+p157
+VThu, 13 Nov 2008 04:43:59 +0000
+p158
+sVprofile_image_url
+p159
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/63987636/EU_normal.jpg
+p160
+sVfrom_user
+p161
+Vfernandr
+p162
+sVfrom_user_id
+p163
+I1888981
+sVto_user_id
+p164
+NsVid
+p165
+I1003324904
+sa(dp166
+Viso_language_code
+p167
+Vpt
+p168
+sVtext
+p169
+VHey, năo consigo mais apagar msg aqui, comofas ?
+p170
+sVcreated_at
+p171
+VThu, 13 Nov 2008 03:07:38 +0000
+p172
+sVprofile_image_url
+p173
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/58158694/DSC06101_normal.JPG
+p174
+sVfrom_user
+p175
+Vjennytangerine
+p176
+sVfrom_user_id
+p177
+I858835
+sVto_user_id
+p178
+NsVid
+p179
+I1003208355
+sa(dp180
+Viso_language_code
+p181
+Vpt
+p182
+sVtext
+p183
+V@lucmult Comofas/ é o ln -s para o @fasassim responder comofas para o @pedrovalente
+p184
+sVcreated_at
+p185
+VThu, 13 Nov 2008 03:02:22 +0000
+p186
+sVprofile_image_url
+p187
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/63138124/Photo_21_normal.jpg
+p188
 sVto_user
-p147
-Vluizaaltino
-p148
-sVfrom_user
-p149
-Vleeiri
-p150
-sVfrom_user_id
-p151
-I1954396
-sVto_user_id
-p152
-I1674872
-sVid
-p153
-I1001338478
-sa(dp154
-Viso_language_code
-p155
-Vpt
-p156
-sVtext
-p157
-Vfudido de grana, mas ainda quero comprar livros. #comofas?
-p158
-sVcreated_at
-p159
-VWed, 12 Nov 2008 01:04:29 +0000
-p160
-sVprofile_image_url
-p161
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/57375017/eye_normal.jpg
-p162
-sVfrom_user
-p163
-Vfelipelobo
-p164
-sVfrom_user_id
-p165
-I136748
-sVto_user_id
-p166
-NsVid
-p167
-I1001333211
-sa(dp168
-Viso_language_code
-p169
-Ven
-p170
-sVtext
-p171
-VRadiohead no Chile e crise, comofas//
-p172
-sVcreated_at
-p173
-VWed, 12 Nov 2008 01:02:34 +0000
-p174
-sVprofile_image_url
-p175
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/59808984/eu_normal.jpg
-p176
-sVfrom_user
-p177
-Vmari_onete
-p178
-sVfrom_user_id
-p179
-I1561967
-sVto_user_id
-p180
-NsVid
-p181
-I1001329908
-sa(dp182
-Viso_language_code
-p183
-Vpt
-p184
-sVtext
-p185
-Vquero malhar, falar espanhol e morar fora, comofas?
-p186
-sVcreated_at
-p187
-VWed, 12 Nov 2008 01:00:14 +0000
-p188
-sVprofile_image_url
 p189
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/60771701/parque_normal.jpg
+Vlucmult
 p190
 sVfrom_user
 p191
-Vphonetrio
+Vericof
 p192
 sVfrom_user_id
 p193
-I2185576
+I1550444
 sVto_user_id
 p194
-NsVid
+I240546
+sVid
 p195
-I1001326064
+I1003201381
 sa(dp196
 Viso_language_code
 p197
 p198
 sVtext
 p199
-V@alegomes Se te consola: meu mac caiu no chăo. Arrumei com ajuda do http://www.ifixit.com/, mas perdi o drive de CD/DVD. #comofas now?
+V@pedrovalente tem algo de especial em 'Comofas/' ??? hum ??? Pq năo 'comofas' ???
 p200
 sVcreated_at
 p201
-VWed, 12 Nov 2008 00:41:38 +0000
+VThu, 13 Nov 2008 03:00:37 +0000
 p202
 sVprofile_image_url
 p203
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/61182697/orkut_normal.jpg
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/52953906/Foto80_normal.jpg
 p204
 sVto_user
 p205
-Valegomes
+Vpedrovalente
 p206
 sVfrom_user
 p207
-Vmarianneabreu
+Vlucmult
 p208
 sVfrom_user_id
 p209
-I508853
+I240546
 sVto_user_id
 p210
-I65808
+I50376
 sVid
 p211
-I1001296479
+I1003199220
 sa(dp212
 Viso_language_code
 p213
 p214
 sVtext
 p215
-V#comofas?  =/
+V@fasassim comofas para o maldito bug ser exterminado?
 p216
 sVcreated_at
 p217
-VWed, 12 Nov 2008 00:39:57 +0000
+VThu, 13 Nov 2008 02:59:13 +0000
 p218
 sVprofile_image_url
 p219
-Vhttp://s3.amazonaws.com/twitter_production/profile_images/39443812/DSC02790_normal.JPG
+Vhttp://s3.amazonaws.com/twitter_production/profile_images/63138124/Photo_21_normal.jpg
 p220
+sVto_user
+p221
+Vfasassim
+p222
 sVfrom_user
-p221
-Vsweethome
-p222
+p223
+Vericof
+p224
 sVfrom_user_id
-p223
-I179059
+p225
+I1550444
 sVto_user_id
-p224
-NsVid
-p225
-I1001294198
+p226
+I2367550
+sVid
+p227
+I1003197205
 sasVsince_id
-p226
+p228
 I0
 sVresults_per_page
-p227
+p229
 I15
 sVquery
-p228
+p230
 Vcomofas
-p229
+p231
 sVmax_id
-p230
-I1001465973
+p232
+I1003650051
 sVpage
-p231
+p233
 I1
 s.