save followers

master
Martin Thielecke 11 months ago
parent 6c2eb2ee12
commit a13da33c4b
Signed by: mthie
GPG Key ID: D1D25A85C8604DFB
  1. 1
      .gitignore
  2. 48
      follower.go
  3. 1
      followers/inactive.json
  4. 1
      followers/inactive_bergi.json
  5. 661
      followers/inactive_ids.txt
  6. 1
      followers/inactive_mthie.json
  7. 38
      main.go

1
.gitignore vendored

@ -2,3 +2,4 @@ settings.yml
.user.json
*.exe
data_collector
inactive

@ -1,11 +1,12 @@
package main
import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"net/http"
"sort"
"strconv"
"os"
"strings"
"time"
@ -37,6 +38,7 @@ func getFollows(u *User, max int) {
for {
client := twitchOauthConfig.Client(context.Background(), u.Token)
req, err := http.NewRequest("GET", "https://api.twitch.tv/helix/users/follows?to_id="+u.ID+after, nil)
// req, err := http.NewRequest("GET", "https://api.twitch.tv/helix/users/follows?to_id=276021569"+after, nil)
if err != nil {
log.WithError(err).Error("Unable to create http request to get twitch follower data")
return
@ -80,22 +82,36 @@ func getFollows(u *User, max int) {
u.TwitchFollowers = result
}
func (f *TwitchFollowers) SaveFiles() {
saveContent("followers", "total", strconv.FormatInt(f.Total, 10))
saveJSON("followers", "complete_list", f)
sort.Slice(f.Data, func(i, j int) bool {
return f.Data[i].FollowedAt.Before(f.Data[j].FollowedAt)
})
start := len(f.Data) - 10
if start < 0 {
start = 0
func readActiveUsers() map[string]bool {
res, err := ioutil.ReadFile(os.Args[1])
if err != nil {
log.WithError(err).Fatal("Unable to read active users")
}
lastFollowers := f.Data[start:]
var lastFollowerSlice []string
for _, v := range lastFollowers {
lastFollowerSlice = append(lastFollowerSlice, v.FromName)
data := make(map[string]bool)
if err := json.NewDecoder(bytes.NewBuffer(res)).Decode(&data); err != nil {
log.WithError(err).Fatal("Unable to decode json")
}
saveContent("followers", "last_ten", strings.Join(lastFollowerSlice, "\n"))
return data
}
func (f *TwitchFollowers) SaveFiles() {
fs := []string{}
active := readActiveUsers()
ids := []string{}
for _, follower := range f.Data {
name := strings.ToLower(follower.FromName)
id := follower.FromID
if _, ok := active[name]; ok {
continue
}
fs = append(fs, name)
ids = append(ids, id)
}
log.Infof("We have %d inactive followers", len(fs))
saveJSON("followers", "inactive", fs)
saveContent("followers", "inactive_ids", strings.Join(ids, "\n"))
}

@ -0,0 +1 @@
["drhailbock","chekoteh","masterof999disasters","marioana_monkey","gomi1990","tekkmasters","pinkymickey424","rie_sendildho","spass_tea","dudrogendealer","henry_ulf","finnlandejjgaming","reinhardt_stecken_187","levelmeister","ichesseunglaeubige","stalins_callboy","pillepalle73","oberemser","elchwiesel","beamjim_","robertreiman","nerfswat","felixfbb","015207088343","zockerente88","john_pantone","brilleschielman","kartoffelbieber","talkgefluester","66diane66","djaneestar","brownfranky","stuebic","schlagerfuzzi","eyjafjallajoekulltarantul","19doro95","schluckspecht1234","xflug1x","sebby420710","ko77ii","geblubber","myco_music","der_langenhorner","eismeister_sz","bisonrattee","dersachse1994","dj_andy84","xx_shiggy_xx","mugenink","hypnoticlivedj","combicarpo","xeniivenz","fynntendo2000","friko45","reddichstrafne","martin_kesici","emma_teenprincess","olli_knolli","reinholdremscheid","realjainiti","literally_lea","dennygee","knossiwurst","josh_x21","hoffka","trinkhalle","derdolly1","sil3nt_moe","streammuffel","lomtroonair","vitares1337","ariu24","jeans91","sternchef","boesehexe666","zofya_","da_mech","deejay_mike1980","dj_impulze_frau84","bertl113","sxhwansin_mainarsxh","mozamel12448","notwars","constispelt","sebwadaz","pad94","samuel_356_","what_1893","leiler","dav133","chris_81","xdorf_fee","darksidegang69","crazy_caro_hh","nachtsurfer","2sitecutness","andreas5189","fixsiesoftlan69","derechtenoob9","dj_ronhill","labihh","fpunktgandi","frankfurt1977","queenfuchsbande","zpia_2803","atthamiss","der_dampfer86","sletschi","coffeetrish","meclex_bratan","betasize","antarzhh","alle_sagen_sprengi","pearlhuhn","daipommy83","zocker7600","roclafok","allesklaroaufmkilimanjaro","vita46","herrtankwart","liontgamer","danniegetsfit","ultimate_duke","menkz2424","rubensgoettin","granmoron","axa2021","domh15","magnus_1978","joe33333","amelaapunkt","1_left","mephistopheles90","king_mogli99","dani_3777","sonny0279","wat_geht_ab","stubenarrest123","zelianova","tomasanjouk","dantecreep","manupi86","n00beffects","thal_aria","ticolinemanu","bassbude","en3rgyvone","thegreatsayaman","german6shepherd","its_spacy","patrick06121983","tobyaas030","derkarum","mellihil","markus1890","andy1987net","maxi_baumann","petronass","ghost_riderhh85","vangenerator","ochsenziemerokk","deraltemannimhaus","s4ndm4n___","trittplattenbremsventil","spellforce87","bonnzy","kuchensuchti01","trixy_haselocke","greyghost22","harrypotter87233","pampamgirl","tiffy_1511","opelvh18","gagisch404","leyyyyyy1998","jagmundo","dalvino030","yuzuri_play","roterapfel04","webmontagkiel","daniel_husss","pumuckel58","grisu23","knoriitv","angelique1990","chinesemaster0572","holywarrior90","b_phisto","nicht_bedwars","undercutty","zodya_","stay_connect","dadi6418","xxjacky95xx","maurerdekollete","stooohh","berstilericho","marcobvb0933","tobibln1","moppelchen","lockedampft","jenneiia","bauerpower95","goldberg831","ela135err","chris9308","t___i__m__o","schillershi","linacelina32","energie76","phischer1","knockout1969","matt21349","cpi32","bmwsepp3","cda3dlive","fruchtzwerg2","derzombieesser","floppymester88","rickisani","musikmann2020","leo_h55","mairaji","noxymann","henning006","l3iir","prinzvaliumx","sunflower_soul89","delaraa","bastiihamburg","isturmkuh","blackdevil66684","faiker0815","senseofee","basketsdieechte","terralordpatchwerk","atom_bohne","klausimo","omaveronica","skate123456","blyya91","matthi132","komafnbr","ateschatate","cody3101","sarah264","procentyt","strangetvger","krawallsche","jelly_melli","telemaeuschen","blaudichhau86","svenyx68","packets2532","apvideo","alexiangdc","anmeldung123","phlegmatiker","alexsniper1983","twitch_tino_","cortez1991","cyberboy_82","taraskasenpai15","112skippy","joelicious","i_maggagamehl","edelverpailt","starsstob_","dat_schimmi","reppirep","hobbyist77","eig3","mclarenj","furzel_burzel","old_toshi","harzdream","optikkrecords47","nedah1","zimtstern4727","fluxio161","schox99","johnfrag","pvtgonzo","fcm_elite","crazybutcher92","speermakanonier1","brain2412","31viki31","stolziholzi","brukarz1972","juliaonair","mandragorane","bootsfahrer1","derechtestuhl","metty78","mars3142","hsv_danny","tattooanton","dave_15_11_","tommy501","coyote2018","herzilein2","jan36jan","singulcus","pandafalke","backfich1","balloonhead666","gamerwg__","pfeiffenwix","torben0418","dwtdevlatex71","christiangiants895","dingo_82","desi0807","konja89","alphakatze82","cherrylady12","xxxmiaxxx","astinktier","werderseppel","cdti","piegaminyt","quantentunnel","pieda","loki83","leuschel","henker83","sabrina4000","flocke777","biomarcelgamer","spargelkopf","thomalla","joschile","dancor0r","zfc_knxcklxcht_editz","heikiii2304","mr_onehand","tobiboss91","deinemudda78","gomi11220","de_chriss","iluminada0","diehobbyschrauber","carlosconil","biokuhtv","herby91","watcherrn","colapowercat","eaglepipe","speedbird_x","lenyarin","fix1309","nightworkertv","kassy_kc","katinka_wob","terraxpress","tilldv","roegelv1","puddinmonster","saikitv","faul_tv","filoukl","flowclient","sterbehilfeee","knallfrosch1984","aceotouchantv","zylinderkopfdichtungen","xxmirimausxx","raketenralfderdritte","fuegobacke","wilmaayakrauln","n0str4s","sarah_fee115","vikings_1234","qstable","montragu","albert_kokastein","pastelblumencafemagdeburg","sir_travellore","leeroyr4y","justinactros1","claprocker","g4merlucky","rexxyfoxxy","black_mantafan","mrtnnnn23","frechekathi0310","bjoern_richter","n3xus_net","silbervampir301","1weizen","aaronwithtwoa","malzeichen","marcel_badeschlappen","faulchenontwitch","zane_fatalflynt9","rayri33","chriswk997","dieausgestossenen","lxcidpumpztv","aylomaylo1995","sleimy_lunara_1909","fntxrl","leachleach","knickderzocker","arktiswolf404","firelg243","tesch439sge","patrice05","maenaak","lingsherum","gelbeinhalb","argarh","nightcorekit","alpi_27","yeul454","evio42","evioplays","dicker_31","c0deb0tb0t","iambenutzungslos","raffarocker","daemonex87","estherreallife","ipr_max","sponge1996","cabitderzweite","lor_magn2008","froschi1702","matschii90","trimaris","patrickhpe","eximinatus","schurik87xx","meradim","micha28_","destenycaste","fifa_pro_20","partypnyx","brozonetv","malteria94","thecrow85","gamernoobs2020","gaertner1987","derkaputtepfleger","hardbulletx","cpt_drehrumbum","jackyeckiiii","lostmann3","horrorfield93","phantomtravel","thegamer2406","derhyphon","gamerzockeryt","stevus666","jayjay12304","tuerkemitmesser","tobidertierpfleger","enteenni","m0gelb0t","xion_tv","der_olle_bambam","paniksmoothy","beaves88","loopitix","frazier98","n4h33m1619","king_mogli","justdiso","bitschumi","blackkartal68","tapereturn","poibackbeca1987","tromostv","joex_red","redangelheart","urrallan","chaosninjasg","mjtjmj","dancarpial","erzgebirgler","ttv_king_domenik","sparkey714","chinuna","dark__angel68305","jack1990uk","lordimitus","dustin13131313","r3l3v3n","kati3103","dreadgirl25","fledermausmann88","gerd1488","mosesahoi","snikkersttv","thundertaker66ttv","heycrossy","martrix003","audicoupletw","blackbalder","theheadhunterdefinger1","stifmeister2014","blingmobil","luxnordengamer2021","zombie638slay","swissentertaiment_","makzhka","shotgunpeter","denisnussi","jacqii_tv","defmi__mp95","panzerknackersg","mrcraftzocker","frank42tv","nk_deathlord","ixstevoxi","devilthequeen_tv","derborsi","dreiplus93","flow_sen83","radioante","eliashuhn","ksskillz","langer_86","gc59er","bratwanne123","bitcrusher90","pati24052","lukas151204","knouthan10","djmatzup","hightechbilly","truckerhardy88","impstyle410","kanny1987","onkeleifel","inszenety","buzzbunker","nue_lukimya","diewandergurke","bigsirm","nrwpriest","tanata95","patric880","pfaffi","luckymela","heroictrucker","callcarlo","kiwirock72bo","division_byzero","horridnadamas","aufpassendubirne","outsiderghost45","dosenkekz","exilki3l3r","exhale40","guus91","tanteflamingo","proximusprime_lp","turbo11_","nordberliner","the_nightmare22","cit23","biene0107","marioalexandre8","el_presidente83","schlumpf51","guenninl","constantinflow","kleinehexesmiley","vapingbo","luis150225","raphu_86","puls030","realsmikey","daniela_meyer","jebs_sy","cxb_john","julianwki","banana1235hj","mdemon","derbockwursttoeter","emzbatzz","20am00","timturtlegaming","phoenixserious","lazarov_44","vitrex_25","swaggerhe","arcass001","jtmmtnjelajette","samy9992","skylinegaming_tv","outkill1988","fentfahrer001","mcaudio_c137","lemans66","anju_entertainments","tolgako17","kingcurryyy","monkeyfant","white_widow1994","gabbarocker1988","lekiamtv","lumtee","booster_tv1","tutanchamuns","dertruckermarco","bignoob1995","domse167","galaxy_domme","simongolf123","rc_florianm","unbekannte_x3","masssel1991","devilcraft","tongyabgu1905","lexx_8108108","xyp3rion","minjas","icekuemmerling","the_destrucker","matzekiller1981","mika_mk4","bosslucaskiller00","monchilein","robingamer707","deranalerattenlurch","uknowkally90","timbo9977","andrini","stefanl1986","sourcrowdt","lowkay","the_one_and_only_ninjess","enterprise1994","ventovirtus","camox101","globi935","olisgamingyt","farex_mit_x","bene12334","jarina90","kaztechsolutions","pixler_pixler","itsamemarkus","error_0815","truckerknapp","ndeavor","bitcollage","misterfisternumberone","jonasletsplaii","hebbet90","fehnrich","p7081","analyst13","tabletopbastler","gtimer0","glembotzky","toomanyyolo","marko1311aliasdapres"]

File diff suppressed because one or more lines are too long

@ -0,0 +1,661 @@
104581199
184173217
638230584
601249157
672537455
496192864
630062742
645045391
662647347
651309149
609564100
657573178
649289460
89122134
658153212
658152664
138715297
549642715
256655279
474693161
647266122
90900268
445664197
652645085
519928193
582486729
648106447
411492512
647215806
538206838
501427397
447743231
614456400
506098320
470793028
555576361
639707816
642485405
591507291
642444068
531050052
542888910
274758806
608027832
641631670
555290059
627348607
555268052
71594781
175181356
637841748
612372366
144129790
36041469
631093084
134107435
634454800
592735514
504166504
526741903
610030257
506363341
631116644
124018266
81996667
463390861
503165891
155830559
109456033
123666150
402403311
564986682
122068709
104501397
467529384
121487041
503612645
245253518
556688671
631052954
633832847
499201076
144406873
402626426
101214842
46072153
557033657
196716510
59156583
473541608
485483560
472159478
524985244
427032439
177442139
267466844
264047453
630366421
627648433
627449559
629409305
524318092
98138102
619440771
209820164
177422049
614997394
193078128
140314810
412508635
552076907
42845390
535874626
209623234
208884550
138200100
212081624
500970564
416972935
155872954
235421055
493149430
583224006
480159041
513072672
584952941
47171915
432856359
623571570
477293911
476801368
180244522
148304193
575030915
554096137
249963204
507960236
621462866
210715957
492746454
83752976
490535827
45318815
470387468
534590759
94816276
580548601
118739581
467519633
485455806
264629853
509696512
604748983
603652107
49868917
401223796
427316250
45400290
540490990
608804495
610488393
147873936
68854686
613723467
63427263
73381072
612228218
479788710
112950727
608731749
402427712
545248071
83366059
610299439
608755706
82114712
589815076
130309846
435325474
45886851
515120426
401843633
100733814
166226091
457717251
151566623
605479700
57095941
455572592
577145465
511663801
555266008
575573779
457732504
454536630
474605518
447313326
117544489
76518434
51222816
538002973
47783692
48061295
584519143
426553259
538329425
600515235
172790115
527667528
490290108
473425017
166451658
480087609
103269478
173256697
110858874
177580731
537814192
540816916
199549399
509070891
496316962
172357772
497719531
587173701
149555220
102365699
400246371
81806179
553596480
50675944
60947361
52162362
264410385
233109403
478754893
535582311
126092119
481010715
545235791
110154951
490548363
513936996
515633025
144668786
464158045
595595454
71151963
512595475
197937439
31170910
48926059
36185567
87998852
74902970
75570995
126800790
108533819
574124458
493899641
95165138
164579196
93342545
137922957
477122164
412089258
108029317
269593297
454334614
134284912
244275427
113558494
502034961
452129896
426175913
479283152
234132065
47537810
587283997
62396484
74064482
26641870
137625917
53102375
499077215
591549398
261933466
488960141
103436840
415857676
465691733
210455573
543766184
105046642
121354347
68451600
411822836
425561310
480575947
473371860
150965745
269955976
101932791
250770792
587118106
467471473
21989176
559851759
410688237
279219760
126190823
447371622
125945412
539788342
556063831
500368420
423526041
173244710
155903732
537377013
74130041
422314749
416345136
12041235
432996090
70421057
97208784
542314180
560475869
522247972
166787693
446338345
201485130
529311277
526429312
447144045
494019663
86103456
459773457
411230164
148508448
461682537
552683902
452554008
73427983
510257923
490034932
414237980
479325014
470127099
151779405
457046583
470761517
417014369
440801362
561715579
446518383
166271543
578157615
103935177
81563677
491090800
450366547
488920826
441440872
180119706
551477364
417006651
463227483
259789092
562146952
36821791
525088756
568264266
441629147
553277784
567198565
463259273
236647760
53285787
462362994
116734373
250729920
256739971
563739333
89161856
190314295
119357443
248540033
545127131
434647758
40089265
67510826
117678857
496369086
501518349
40542194
151647603
513548000
496372475
247722814
480779104
499476224
61082933
501166310
153036912
140001302
461776825
500069629
38000937
511376242
502307070
186548374
466576629
539047719
74330357
50389248
203124493
114424123
198208416
280757375
155832203
140979252
463308260
54642190
59163733
536376483
523067383
161467794
461797418
117540277
431074400
255612552
60843199
71746327
484956903
499195177
500760940
48748019
452415729
233527243
479166710
504501935
402407757
163764773
57310002
59062994
78319708
525959373
502759216
525983969
40168805
35991401
119388393
148380168
106423587
515951621
124586251
495939166
480910975
112546317
211852624
76326868
174597945
500606816
70238024
402208694
479121854
424334938
44927298
72098433
443216019
517330341
147423110
516398120
245590692
426018861
443845891
134296323
194878084
81417147
404033775
42067422
441086466
404792741
133219453
104007135
484685860
93903260
502278844
432852482
89823490
427423308
171344391
500495711
151213104
477169855
122037532
216680640
440202725
75143485
81864555
486679299
507788506
147128006
405943581
425526490
176130697
199593229
422466054
255818699
144921370
400368958
120373848
426389992
496622455
472625285
471213475
114895908
509929085
87805120
81617783
504539619
483001956
491523444
436580034
159113616
171696058
476644597
78587740
140898709
139437170
503778116
473949136
252421932
192024040
478799156
172973558
504791359
491157527
428659596
72154146
483672794
450009761
63318507
454001169
91524807
469113964
503306250
191426875
269684888
480527367
413894107
64110729
502777307
431486734
500654786
499451503
145295317
119135542
253838752
112661307
100205609
496082371
420432761
116613704
118287570
68426268
494113080
441875512
154369834
403385420
426567556
172399760
213957327
484296398
119744087
446340683
479085602
479068762
158923163
148764459
76733873
453193322
115169109
405712884
467898191
233797764
174570205
48874563
477317389
61114164
254244434
179419652
439565380
64294860
476849389
464168948
271562204
157900848
424940551
89783204
169624597
72564917
246556329
258581066
472922464
77824660
278507741
84447202
465589463
476551406
264608077
248119668
438616048
51577226
224567501
159388662
150333393
151662544
136535331
133788008
141195168
465603003
143517093
140009657
474626242
276984578
453371852
414057245
454664269
470116093
472400097
36811276
87072108
469165245
150774188
136927063
158417536
126975794
126791714
452361749
85647064
471651398
211178954
131588673
466394697
196173280
67412713
187185520
469434184
445066311
90078194
87605503
85240039
455053661
446906165
86980522
462869520
449813835
173404200

@ -0,0 +1 @@
["ffrommer02","drhailbock","chekoteh","masterof999disasters","marioana_monkey","gomi1990","tekkmasters","pinkymickey424","rie_sendildho","spass_tea","dudrogendealer","henry_ulf","finnlandejjgaming","reinhardt_stecken_187","levelmeister","ichesseunglaeubige","stalins_callboy","pillepalle73","oberemser","elchwiesel","beamjim_","robertreiman","nerfswat","felixfbb","015207088343","zockerente88","john_pantone","brilleschielman","kartoffelbieber","talkgefluester","66diane66","djaneestar","brownfranky","stuebic","schlagerfuzzi","eyjafjallajoekulltarantul","19doro95","schluckspecht1234","xflug1x","sebby420710","ko77ii","geblubber","myco_music","der_langenhorner","eismeister_sz","bisonrattee","dersachse1994","dj_andy84","xx_shiggy_xx","mugenink","hypnoticlivedj","combicarpo","xeniivenz","fynntendo2000","friko45","reddichstrafne","martin_kesici","emma_teenprincess","olli_knolli","reinholdremscheid","realjainiti","literally_lea","dennygee","knossiwurst","josh_x21","hoffka","trinkhalle","derdolly1","sil3nt_moe","streammuffel","lomtroonair","vitares1337","ariu24","jeans91","sternchef","boesehexe666","zofya_","da_mech","deejay_mike1980","dj_impulze_frau84","bertl113","sxhwansin_mainarsxh","mozamel12448","notwars","constispelt","sebwadaz","pad94","samuel_356_","what_1893","leiler","dav133","chris_81","xdorf_fee","darksidegang69","crazy_caro_hh","nachtsurfer","2sitecutness","andreas5189","fixsiesoftlan69","derechtenoob9","dj_ronhill","labihh","fpunktgandi","frankfurt1977","queenfuchsbande","zpia_2803","atthamiss","der_dampfer86","sletschi","coffeetrish","meclex_bratan","betasize","antarzhh","alle_sagen_sprengi","pearlhuhn","daipommy83","zocker7600","roclafok","allesklaroaufmkilimanjaro","vita46","herrtankwart","liontgamer","danniegetsfit","ultimate_duke","menkz2424","rubensgoettin","granmoron","axa2021","domh15","magnus_1978","joe33333","amelaapunkt","1_left","mephistopheles90","king_mogli99","dani_3777","sonny0279","wat_geht_ab","stubenarrest123","zelianova","tomasanjouk","dantecreep","manupi86","n00beffects","thal_aria","ticolinemanu","bassbude","en3rgyvone","thegreatsayaman","german6shepherd","its_spacy","patrick06121983","tobyaas030","derkarum","mellihil","markus1890","andy1987net","maxi_baumann","petronass","ghost_riderhh85","vangenerator","ochsenziemerokk","deraltemannimhaus","s4ndm4n___","trittplattenbremsventil","spellforce87","bonnzy","kuchensuchti01","trixy_haselocke","greyghost22","harrypotter87233","pampamgirl","tiffy_1511","opelvh18","gagisch404","leyyyyyy1998","jagmundo","dalvino030","yuzuri_play","roterapfel04","webmontagkiel","daniel_husss","pumuckel58","grisu23","knoriitv","angelique1990","chinesemaster0572","holywarrior90","b_phisto","nicht_bedwars","undercutty","zodya_","stay_connect","dadi6418","xxjacky95xx","maurerdekollete","stooohh","berstilericho","marcobvb0933","tobibln1","moppelchen","lockedampft","jenneiia","bauerpower95","goldberg831","ela135err","chris9308","t___i__m__o","schillershi","linacelina32","energie76","phischer1","knockout1969","matt21349","cpi32","bmwsepp3","cda3dlive","fruchtzwerg2","derzombieesser","floppymester88","rickisani","musikmann2020","leo_h55","mairaji","noxymann","henning006","l3iir","prinzvaliumx","sunflower_soul89","delaraa","bastiihamburg","isturmkuh","blackdevil66684","faiker0815","senseofee","basketsdieechte","terralordpatchwerk","atom_bohne","klausimo","omaveronica","skate123456","blyya91","matthi132","komafnbr","ateschatate","cody3101","sarah264","procentyt","strangetvger","krawallsche","jelly_melli","telemaeuschen","blaudichhau86","svenyx68","packets2532","apvideo","alexiangdc","anmeldung123","phlegmatiker","alexsniper1983","twitch_tino_","cortez1991","cyberboy_82","taraskasenpai15","112skippy","joelicious","i_maggagamehl","edelverpailt","starsstob_","dat_schimmi","reppirep","hobbyist77","eig3","mclarenj","furzel_burzel","old_toshi","harzdream","optikkrecords47","nedah1","zimtstern4727","fluxio161","schox99","johnfrag","pvtgonzo","fcm_elite","crazybutcher92","speermakanonier1","brain2412","31viki31","stolziholzi","brukarz1972","juliaonair","mandragorane","bootsfahrer1","derechtestuhl","metty78","mars3142","hsv_danny","tattooanton","dave_15_11_","tommy501","coyote2018","herzilein2","jan36jan","singulcus","pandafalke","backfich1","balloonhead666","gamerwg__","pfeiffenwix","torben0418","dwtdevlatex71","christiangiants895","dingo_82","desi0807","konja89","alphakatze82","cherrylady12","xxxmiaxxx","astinktier","werderseppel","cdti","piegaminyt","quantentunnel","pieda","loki83","leuschel","henker83","sabrina4000","flocke777","biomarcelgamer","spargelkopf","thomalla","joschile","dancor0r","zfc_knxcklxcht_editz","heikiii2304","mr_onehand","tobiboss91","deinemudda78","gomi11220","de_chriss","iluminada0","diehobbyschrauber","carlosconil","biokuhtv","herby91","watcherrn","colapowercat","eaglepipe","speedbird_x","lenyarin","fix1309","nightworkertv","kassy_kc","katinka_wob","terraxpress","tilldv","roegelv1","puddinmonster","saikitv","faul_tv","filoukl","flowclient","sterbehilfeee","knallfrosch1984","aceotouchantv","zylinderkopfdichtungen","xxmirimausxx","raketenralfderdritte","fuegobacke","wilmaayakrauln","n0str4s","sarah_fee115","vikings_1234","qstable","montragu","albert_kokastein","pastelblumencafemagdeburg","sir_travellore","leeroyr4y","justinactros1","claprocker","g4merlucky","rexxyfoxxy","black_mantafan","mrtnnnn23","frechekathi0310","bjoern_richter","n3xus_net","silbervampir301","1weizen","aaronwithtwoa","malzeichen","marcel_badeschlappen","faulchenontwitch","zane_fatalflynt9","rayri33","chriswk997","dieausgestossenen","lxcidpumpztv","aylomaylo1995","sleimy_lunara_1909","fntxrl","leachleach","knickderzocker","arktiswolf404","firelg243","tesch439sge","patrice05","maenaak","lingsherum","gelbeinhalb","argarh","nightcorekit","alpi_27","yeul454","evio42","evioplays","dicker_31","c0deb0tb0t","iambenutzungslos","raffarocker","daemonex87","estherreallife","ipr_max","sponge1996","cabitderzweite","lor_magn2008","froschi1702","matschii90","trimaris","patrickhpe","eximinatus","schurik87xx","meradim","micha28_","destenycaste","fifa_pro_20","partypnyx","brozonetv","malteria94","thecrow85","gamernoobs2020","gaertner1987","derkaputtepfleger","hardbulletx","cpt_drehrumbum","jackyeckiiii","lostmann3","horrorfield93","phantomtravel","thegamer2406","derhyphon","gamerzockeryt","stevus666","jayjay12304","tuerkemitmesser","tobidertierpfleger","enteenni","m0gelb0t","xion_tv","der_olle_bambam","paniksmoothy","beaves88","loopitix","frazier98","n4h33m1619","king_mogli","justdiso","bitschumi","blackkartal68","tapereturn","poibackbeca1987","tromostv","joex_red","redangelheart","urrallan","chaosninjasg","mjtjmj","dancarpial","erzgebirgler","ttv_king_domenik","sparkey714","chinuna","dark__angel68305","jack1990uk","lordimitus","dustin13131313","r3l3v3n","kati3103","dreadgirl25","fledermausmann88","gerd1488","mosesahoi","snikkersttv","thundertaker66ttv","heycrossy","martrix003","audicoupletw","blackbalder","theheadhunterdefinger1","stifmeister2014","blingmobil","luxnordengamer2021","zombie638slay","swissentertaiment_","makzhka","shotgunpeter","denisnussi","jacqii_tv","defmi__mp95","panzerknackersg","mrcraftzocker","frank42tv","nk_deathlord","ixstevoxi","devilthequeen_tv","derborsi","dreiplus93","flow_sen83","radioante","eliashuhn","ksskillz","langer_86","gc59er","bratwanne123","bitcrusher90","pati24052","lukas151204","knouthan10","djmatzup","hightechbilly","truckerhardy88","impstyle410","kanny1987","onkeleifel","inszenety","buzzbunker","nue_lukimya","diewandergurke","bigsirm","nrwpriest","tanata95","patric880","pfaffi","luckymela","heroictrucker","callcarlo","kiwirock72bo","division_byzero","horridnadamas","aufpassendubirne","outsiderghost45","dosenkekz","exilki3l3r","exhale40","guus91","tanteflamingo","proximusprime_lp","turbo11_","nordberliner","the_nightmare22","cit23","biene0107","marioalexandre8","el_presidente83","schlumpf51","guenninl","constantinflow","kleinehexesmiley","vapingbo","luis150225","raphu_86","puls030","realsmikey","daniela_meyer","jebs_sy","cxb_john","julianwki","banana1235hj","mdemon","derbockwursttoeter","emzbatzz","20am00","timturtlegaming","phoenixserious","lazarov_44","vitrex_25","swaggerhe","arcass001","jtmmtnjelajette","samy9992","skylinegaming_tv","outkill1988","fentfahrer001","mcaudio_c137","lemans66","anju_entertainments","tolgako17","kingcurryyy","monkeyfant","white_widow1994","gabbarocker1988","lekiamtv","lumtee","booster_tv1","tutanchamuns","dertruckermarco","bignoob1995","domse167","galaxy_domme","simongolf123","rc_florianm","unbekannte_x3","masssel1991","devilcraft","tongyabgu1905","lexx_8108108","xyp3rion","minjas","icekuemmerling","the_destrucker","matzekiller1981","mika_mk4","bosslucaskiller00","monchilein","robingamer707","deranalerattenlurch","uknowkally90","timbo9977","andrini","stefanl1986","sourcrowdt","lowkay","the_one_and_only_ninjess","enterprise1994","ventovirtus","camox101","globi935","olisgamingyt","farex_mit_x","bene12334","jarina90","kaztechsolutions","pixler_pixler","itsamemarkus","error_0815","truckerknapp","ndeavor","bitcollage","misterfisternumberone","jonasletsplaii","hebbet90","fehnrich","p7081","analyst13","tabletopbastler","gtimer0","glembotzky","toomanyyolo","marko1311aliasdapres"]

@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"net/http"
"os"
"time"
"github.com/Luzifer/rconfig"
@ -48,18 +49,7 @@ func main() {
go func() {
if user != nil {
handleSaves()
}
interval := 20 * time.Second
if settings.UpdateInterval > 10*time.Second {
interval = settings.UpdateInterval
}
log.Infof("Update interval: %s", interval)
c := time.Tick(interval)
for range c {
if user == nil {
continue
}
handleSaves()
os.Exit(0)
}
}()
@ -74,15 +64,6 @@ func handleSaves() {
getUser(user)
if user.TwitchUser != nil {
user.TwitchUser.SaveFiles()
}
getChannel(user)
if user.TwitchChannel != nil {
user.TwitchChannel.SaveFiles()
}
maxFollower := -1
if settings.MaxFollowers > 0 {
maxFollower = settings.MaxFollowers
@ -92,21 +73,6 @@ func handleSaves() {
if user.TwitchFollowers != nil {
user.TwitchFollowers.SaveFiles()
}
maxSubs := -1
if settings.MaxSubs > 0 {
maxSubs = settings.MaxSubs
}
log.Infof("Fetch max subs: %d", maxSubs)
getSubs(user, maxSubs)
if user.TwitchSubscriptions != nil {
user.TwitchSubscriptions.SaveFiles()
}
getStreams(user)
if user.TwitchStream != nil {
user.TwitchStream.SaveFiles()
}
}
func handleTwitchLogin(w http.ResponseWriter, r *http.Request) {

Loading…
Cancel
Save