Limit text reason to 200 characters

This commit is contained in:
spla 2022-02-14 17:05:23 +01:00
pare a36a16d43c
commit 96da1a1118
S'han modificat 2 arxius amb 142 adicions i 176 eliminacions

Veure arxiu

@ -315,11 +315,23 @@ if __name__ == '__main__':
while i < len(id_lst):
if detect(text_lst[i]) != 'ca' or len(text_lst) == 1:
if len(text_lst[i]) > 1:
text_lang = detect(text_lst[i])
else:
text_lang = 'en'
if text_lang != 'ca' or len(text_lst) == 1:
is_tor_exit_node = check_ip(ip_lst[i])
tor_exit_node = 't' if is_tor_exit_node else 'f'
tor_exit_node = 't' if is_tor_exit_node == 't' else 'f'
text_length = 200 if len(text_lst[i]) > 200 else len(text_lst[i])
reason_text = '{0}...'.format(text_lst[i][:text_length].rsplit(' ', 1)[0])
conn = None
@ -329,7 +341,7 @@ if __name__ == '__main__':
cur = conn.cursor()
cur.execute(insert_sql, (created_at_lst[i], id_lst[i], email_lst[i], ip_lst[i], text_lst[i], tor_exit_node))
cur.execute(insert_sql, (created_at_lst[i], id_lst[i], email_lst[i], ip_lst[i], reason_text, tor_exit_node))
conn.commit()

Veure arxiu

@ -1,4 +1,3 @@
176.10.99.200
109.70.100.28
51.75.64.23
82.221.128.191
@ -24,9 +23,7 @@
185.82.219.109
185.220.103.4
199.249.230.89
45.15.16.114
45.15.16.68
45.15.16.117
45.15.16.70
212.21.66.6
217.79.178.53
185.220.100.242
@ -37,7 +34,6 @@
109.70.100.21
185.220.100.246
213.95.149.22
162.247.74.7
109.169.33.163
81.16.33.31
82.221.131.5
@ -133,7 +129,6 @@
94.142.244.16
198.96.155.3
185.130.44.108
82.221.131.71
178.17.170.135
159.89.174.9
185.220.100.250
@ -144,7 +139,6 @@
109.70.100.24
162.247.74.216
104.244.74.57
185.100.87.41
188.214.104.146
162.247.74.200
162.247.73.192
@ -153,12 +147,10 @@
185.220.100.249
185.56.171.94
164.132.9.199
37.228.129.2
185.42.170.203
185.100.86.154
163.172.41.228
130.149.80.199
185.100.86.128
199.249.230.123
199.249.230.106
199.249.230.108
@ -186,7 +178,6 @@
178.17.174.14
94.32.66.15
87.118.116.12
178.17.174.196
199.249.230.80
51.38.233.93
171.25.193.20
@ -202,9 +193,9 @@
103.28.52.93
95.216.145.1
204.85.191.9
46.194.41.14
46.194.11.186
185.35.202.222
71.174.105.126
104.244.72.115
109.70.100.35
109.70.100.36
@ -220,6 +211,7 @@
91.132.147.168
107.189.10.237
82.146.55.139
217.79.179.7
185.38.175.130
195.144.21.219
94.140.114.190
@ -288,11 +280,8 @@
193.189.100.198
193.189.100.196
193.189.100.197
101.3.122.52
101.3.119.221
101.3.121.135
101.3.118.105
104.244.76.170
88.80.20.86
199.249.230.67
199.249.230.178
199.249.230.66
@ -311,7 +300,6 @@
199.249.230.110
199.249.230.78
147.135.105.62
101.100.146.147
185.220.102.241
185.220.102.245
185.220.102.246
@ -374,7 +362,6 @@
213.164.204.90
104.244.77.101
79.136.1.46
185.56.80.65
198.98.61.131
198.98.48.175
51.195.103.74
@ -386,7 +373,6 @@
185.196.2.251
209.141.56.96
205.185.120.173
37.187.96.183
209.141.41.225
104.244.72.152
204.8.156.142
@ -400,7 +386,6 @@
104.244.79.196
213.164.204.94
213.164.204.160
208.68.4.129
37.187.196.70
45.153.160.2
192.42.116.27
@ -472,7 +457,6 @@
51.15.197.24
209.141.55.26
185.193.127.153
37.187.2.76
185.100.87.250
82.221.139.190
194.182.73.224
@ -491,6 +475,7 @@
193.218.118.147
185.100.87.129
45.151.167.11
185.10.68.65
190.10.8.166
139.99.239.135
51.79.204.46
@ -501,11 +486,9 @@
185.104.120.10
62.171.142.3
176.126.253.190
45.121.147.218
198.54.128.62
51.158.183.63
45.192.176.44
209.141.49.232
72.167.47.69
91.219.237.21
213.164.206.124
@ -523,6 +506,7 @@
5.2.69.50
185.83.214.69
156.146.34.193
89.163.243.88
89.163.252.30
89.163.252.230
5.199.143.202
@ -534,7 +518,6 @@
173.212.219.49
159.65.50.174
96.66.15.152
216.186.250.53
185.107.47.171
138.68.69.37
5.2.67.226
@ -550,9 +533,7 @@
51.195.107.236
205.185.126.167
213.164.204.177
205.185.123.97
199.195.253.149
205.185.113.225
5.2.76.221
66.220.242.222
5.2.72.226
@ -574,7 +555,6 @@
107.189.31.87
139.162.43.196
107.189.7.243
185.129.62.62
104.244.73.169
107.189.30.58
107.189.2.222
@ -597,7 +577,6 @@
77.68.20.217
45.61.185.125
185.10.68.195
41.215.241.146
93.95.227.69
93.95.227.55
93.95.227.202
@ -605,22 +584,12 @@
185.112.144.49
187.20.55.213
209.141.46.81
45.61.184.239
104.244.76.44
198.98.57.24
62.212.95.196
93.95.227.227
192.160.102.169
192.160.102.170
192.160.102.164
46.232.249.138
198.144.121.43
192.160.102.166
185.165.168.77
199.195.251.182
36.227.165.125
192.160.102.165
192.160.102.168
107.189.31.195
107.189.7.175
107.189.5.68
@ -638,7 +607,6 @@
45.61.185.53
45.61.184.244
195.37.209.9
95.211.100.149
5.182.210.216
82.118.253.153
185.100.87.253
@ -679,10 +647,8 @@
198.98.57.191
141.95.18.225
107.189.12.148
209.141.60.19
104.244.76.127
141.95.18.207
205.185.116.201
213.164.206.127
185.220.101.1
185.220.101.3
@ -754,7 +720,6 @@
107.189.2.91
37.123.163.58
5.255.97.176
176.58.89.182
185.112.144.68
193.32.127.153
193.32.127.156
@ -779,7 +744,6 @@
185.100.87.136
23.184.48.9
107.189.1.90
185.38.175.132
54.37.16.241
185.129.61.6
185.129.61.5
@ -799,14 +763,13 @@
23.129.64.212
23.129.64.211
104.244.78.213
107.189.1.178
93.95.228.129
195.254.135.76
185.100.85.132
199.195.248.29
5.255.96.245
204.85.191.7
107.189.3.244
5.79.109.48
193.218.118.231
107.189.12.97
104.244.75.74
@ -865,7 +828,7 @@
185.220.103.119
51.15.76.60
142.4.205.238
45.13.104.179
80.67.167.81
185.51.76.187
160.119.249.240
51.15.244.188
@ -886,68 +849,23 @@
81.17.18.58
199.195.253.156
198.98.49.20
185.220.101.146
185.220.101.178
185.220.101.143
185.220.101.150
185.220.101.149
185.220.101.148
185.220.101.142
185.220.101.138
185.220.101.151
185.220.101.139
185.220.101.156
185.220.101.141
185.220.101.134
185.220.101.152
185.220.101.147
185.220.101.177
185.220.101.144
185.220.101.136
185.220.101.158
185.220.101.137
185.220.101.175
185.220.101.157
185.220.101.133
185.220.101.159
185.220.101.135
185.220.101.155
185.220.101.145
185.220.101.140
185.220.101.166
185.220.101.171
185.220.101.160
185.220.101.168
185.220.101.170
185.220.101.172
185.220.101.161
185.220.101.167
185.220.101.173
185.220.101.162
185.220.101.169
185.220.101.163
185.220.101.153
185.220.101.165
185.220.101.164
185.220.101.174
185.220.101.176
185.220.101.184
185.220.101.187
185.220.101.188
185.220.101.181
185.220.101.154
185.220.101.191
185.220.101.183
185.220.101.186
185.220.101.180
185.220.101.132
185.220.101.179
185.220.101.182
185.220.101.185
185.220.101.190
185.220.101.189
151.80.148.159
5.2.79.111
178.170.37.11
104.244.74.23
209.141.37.94
@ -969,10 +887,9 @@
185.100.87.174
194.32.107.51
95.214.54.97
191.101.217.20
191.101.31.19
5.2.70.140
5.255.102.127
5.255.100.243
83.97.20.151
185.247.226.89
37.228.129.109
@ -993,12 +910,12 @@
212.47.229.4
107.174.138.172
185.100.87.133
51.15.43.205
193.46.254.26
89.58.30.164
144.217.86.109
23.184.48.209
45.61.187.26
103.73.64.111
185.143.220.236
194.147.84.41
199.195.248.20
@ -1007,67 +924,53 @@
117.53.155.129
185.36.81.95
93.95.230.253
89.58.19.2
89.58.17.0
147.135.62.201
51.15.67.157
185.170.114.243
173.237.206.68
93.95.231.27
194.32.107.159
5.45.100.222
37.120.177.0
194.32.107.161
152.89.107.127
51.81.85.168
152.89.105.0
198.98.49.184
194.32.107.171
192.144.39.121
185.247.226.69
202.61.224.72
5.255.98.156
104.219.236.100
124.156.9.65
51.15.7.157
144.172.118.37
40.71.125.29
213.66.116.248
23.184.48.238
51.158.147.221
162.219.176.3
184.75.221.43
74.82.47.194
93.95.230.245
37.48.117.204
185.112.144.158
45.61.173.73
46.226.105.168
37.187.49.191
209.141.55.96
185.130.47.82
23.154.177.19
23.154.177.21
23.154.177.18
23.154.177.20
89.58.17.76
89.58.18.0
188.68.58.0
185.243.218.41
185.243.218.46
185.193.127.45
185.225.68.13
69.61.38.236
104.192.3.118
103.234.220.205
104.219.236.119
31.42.184.136
172.81.131.110
172.107.94.154
185.247.225.60
23.175.32.11
193.218.118.158
81.16.33.42
46.38.247.22
185.243.216.93
185.243.216.17
167.71.5.126
85.165.185.74
23.175.32.13
109.70.100.76
109.70.100.82
@ -1103,30 +1006,18 @@
185.220.101.82
185.220.101.64
185.220.101.70
135.148.138.206
51.81.87.149
185.14.97.145
185.14.97.224
45.56.70.111
45.33.106.16
185.254.75.32
185.247.225.62
80.78.22.210
87.120.254.105
118.163.74.160
45.227.255.35
212.102.39.137
185.247.226.96
185.247.226.97
185.247.226.98
83.97.20.84
185.112.147.12
185.247.225.61
185.247.225.64
185.247.225.63
209.141.44.64
193.38.54.131
216.239.90.19
5.255.99.188
212.227.10.157
23.128.248.10
23.128.248.13
23.128.248.11
@ -1140,9 +1031,7 @@
23.128.248.15
198.98.50.199
185.146.232.25
87.249.134.84
205.185.122.29
37.221.209.148
192.109.119.104
23.128.248.24
23.128.248.28
@ -1152,52 +1041,117 @@
23.128.248.26
23.128.248.29
23.128.248.22
185.10.68.126
23.128.248.21
195.238.126.90
23.184.48.252
65.21.217.81
23.184.48.250
23.184.48.253
23.184.48.249
5.199.174.107
23.184.48.248
23.184.48.251
71.19.144.235
23.184.48.28
23.184.48.27
23.184.48.29
91.211.89.198
23.184.48.30
91.211.89.30
103.242.117.120
109.220.104.162
193.189.100.167
193.189.100.168
193.189.100.169
185.14.97.117
185.14.97.76
185.14.97.192
45.82.67.10
185.14.97.89
185.14.97.75
185.14.97.188
185.14.97.185
185.14.97.191
185.14.97.74
193.218.118.73
91.211.91.212
91.211.91.214
91.211.91.210
91.211.91.76
91.211.91.220
91.211.91.219
91.211.91.78
91.211.91.213
91.211.91.183
91.211.91.218
91.211.91.215
91.211.91.217
91.211.91.216
216.10.247.146
176.119.159.28
107.189.11.80
185.154.110.142
193.105.134.150
172.245.187.126
23.95.209.189
91.149.225.172
91.211.89.43
91.203.144.194
145.239.91.37
146.70.58.168
209.141.34.134
185.100.85.24
23.128.248.30
219.100.36.177
5.252.178.210
107.189.10.218
107.189.28.69
54.38.183.101
142.4.206.84
185.163.119.0
89.187.144.177
146.70.29.254
31.13.195.141
99.145.92.47
5.161.50.130
185.100.85.25
194.32.107.60
78.130.128.106
185.34.33.2
135.125.205.142
104.244.74.119
167.86.70.160
185.244.31.4
5.79.109.48
138.59.17.40
109.234.39.235
81.17.19.58
185.146.232.119
77.220.212.2
194.15.216.21
52.90.237.0
38.242.197.205
185.53.46.190
5.255.101.126
37.228.129.133
51.222.107.173
193.169.254.250
185.100.85.22
107.189.29.27
185.100.85.23
178.254.40.11
23.128.248.31
45.61.188.142
107.189.12.47
89.44.9.72
92.12.196.104
88.105.250.40
107.189.28.71
89.58.19.0
93.95.230.4
185.247.226.37
45.61.188.144
70.34.197.245
146.70.78.32
62.113.114.146
185.125.168.28
45.41.240.19
151.73.115.218
60.241.155.112
195.144.21.153
161.97.116.228
104.244.75.172
5.161.56.15
107.189.2.111
194.15.115.41
5.230.70.208
38.242.197.203
146.70.86.234
78.46.85.61
89.187.143.31
104.149.155.226
185.165.171.40
107.189.12.7
72.14.179.10
85.206.169.120
185.112.147.12
151.237.185.110
198.98.51.31
45.14.224.40
34.125.156.77
52.23.185.221
78.142.18.95
5.2.76.207
106.104.36.33
45.88.79.108
185.10.68.126
92.35.66.155
190.2.131.205
185.193.125.42
185.100.86.128
62.171.137.169
94.140.115.76
141.136.0.117
185.82.126.31
94.140.115.133
94.140.114.213
94.140.114.174
185.82.126.222
185.82.127.25
141.136.0.129