├── .gitignore
├── LICENSE
├── README.md
├── twidere
├── README.md
├── bots.xml
├── filters.dtd
└── harassment.xml
└── twitter
├── README.md
├── maozi.csv
├── pink_1.csv
├── pink_wumao_1.csv
├── scripts
├── obtain_token.py
└── show_twitter_id.py
└── wumao_1.csv
/.gitignore:
--------------------------------------------------------------------------------
1 | # IDE specific files
2 |
3 | .idea/
4 | *.iml
5 |
6 | # Token and config files
7 |
8 | .twitter_token
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | CC0 1.0 Universal
2 |
3 | Statement of Purpose
4 |
5 | The laws of most jurisdictions throughout the world automatically confer
6 | exclusive Copyright and Related Rights (defined below) upon the creator and
7 | subsequent owner(s) (each and all, an "owner") of an original work of
8 | authorship and/or a database (each, a "Work").
9 |
10 | Certain owners wish to permanently relinquish those rights to a Work for the
11 | purpose of contributing to a commons of creative, cultural and scientific
12 | works ("Commons") that the public can reliably and without fear of later
13 | claims of infringement build upon, modify, incorporate in other works, reuse
14 | and redistribute as freely as possible in any form whatsoever and for any
15 | purposes, including without limitation commercial purposes. These owners may
16 | contribute to the Commons to promote the ideal of a free culture and the
17 | further production of creative, cultural and scientific works, or to gain
18 | reputation or greater distribution for their Work in part through the use and
19 | efforts of others.
20 |
21 | For these and/or other purposes and motivations, and without any expectation
22 | of additional consideration or compensation, the person associating CC0 with a
23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
25 | and publicly distribute the Work under its terms, with knowledge of his or her
26 | Copyright and Related Rights in the Work and the meaning and intended legal
27 | effect of CC0 on those rights.
28 |
29 | 1. Copyright and Related Rights. A Work made available under CC0 may be
30 | protected by copyright and related or neighboring rights ("Copyright and
31 | Related Rights"). Copyright and Related Rights include, but are not limited
32 | to, the following:
33 |
34 | i. the right to reproduce, adapt, distribute, perform, display, communicate,
35 | and translate a Work;
36 |
37 | ii. moral rights retained by the original author(s) and/or performer(s);
38 |
39 | iii. publicity and privacy rights pertaining to a person's image or likeness
40 | depicted in a Work;
41 |
42 | iv. rights protecting against unfair competition in regards to a Work,
43 | subject to the limitations in paragraph 4(a), below;
44 |
45 | v. rights protecting the extraction, dissemination, use and reuse of data in
46 | a Work;
47 |
48 | vi. database rights (such as those arising under Directive 96/9/EC of the
49 | European Parliament and of the Council of 11 March 1996 on the legal
50 | protection of databases, and under any national implementation thereof,
51 | including any amended or successor version of such directive); and
52 |
53 | vii. other similar, equivalent or corresponding rights throughout the world
54 | based on applicable law or treaty, and any national implementations thereof.
55 |
56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of,
57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
59 | and Related Rights and associated claims and causes of action, whether now
60 | known or unknown (including existing as well as future claims and causes of
61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum
62 | duration provided by applicable law or treaty (including future time
63 | extensions), (iii) in any current or future medium and for any number of
64 | copies, and (iv) for any purpose whatsoever, including without limitation
65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
66 | the Waiver for the benefit of each member of the public at large and to the
67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver
68 | shall not be subject to revocation, rescission, cancellation, termination, or
69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work
70 | by the public as contemplated by Affirmer's express Statement of Purpose.
71 |
72 | 3. Public License Fallback. Should any part of the Waiver for any reason be
73 | judged legally invalid or ineffective under applicable law, then the Waiver
74 | shall be preserved to the maximum extent permitted taking into account
75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
76 | is so judged Affirmer hereby grants to each affected person a royalty-free,
77 | non transferable, non sublicensable, non exclusive, irrevocable and
78 | unconditional license to exercise Affirmer's Copyright and Related Rights in
79 | the Work (i) in all territories worldwide, (ii) for the maximum duration
80 | provided by applicable law or treaty (including future time extensions), (iii)
81 | in any current or future medium and for any number of copies, and (iv) for any
82 | purpose whatsoever, including without limitation commercial, advertising or
83 | promotional purposes (the "License"). The License shall be deemed effective as
84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the
85 | License for any reason be judged legally invalid or ineffective under
86 | applicable law, such partial invalidity or ineffectiveness shall not
87 | invalidate the remainder of the License, and in such case Affirmer hereby
88 | affirms that he or she will not (i) exercise any of his or her remaining
89 | Copyright and Related Rights in the Work or (ii) assert any associated claims
90 | and causes of action with respect to the Work, in either case contrary to
91 | Affirmer's express Statement of Purpose.
92 |
93 | 4. Limitations and Disclaimers.
94 |
95 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
96 | surrendered, licensed or otherwise affected by this document.
97 |
98 | b. Affirmer offers the Work as-is and makes no representations or warranties
99 | of any kind concerning the Work, express, implied, statutory or otherwise,
100 | including without limitation warranties of title, merchantability, fitness
101 | for a particular purpose, non infringement, or the absence of latent or
102 | other defects, accuracy, or the present or absence of errors, whether or not
103 | discoverable, all to the greatest extent permissible under applicable law.
104 |
105 | c. Affirmer disclaims responsibility for clearing rights of other persons
106 | that may apply to the Work or any use thereof, including without limitation
107 | any person's Copyright and Related Rights in the Work. Further, Affirmer
108 | disclaims responsibility for obtaining any necessary consents, permissions
109 | or other rights required for any use of the Work.
110 |
111 | d. Affirmer understands and acknowledges that Creative Commons is not a
112 | party to this document and has no duty or obligation with respect to this
113 | CC0 or use of the Work.
114 |
115 | For more information, please see
116 |
117 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WTB - Who To Block
2 |
3 | 这是一个不友好,不客观,不中立,不公正的代码仓库。共享了部分屏蔽/过滤列表。
4 |
5 | ## 目录介绍
6 |
7 | * `twitter`:适用于 Twitter 官网的屏蔽列表
8 | * `twidere`:适用于 Twidere 订阅的过滤器列表
9 |
10 | ## 如何贡献
11 |
12 | 如果你不是技术人员,可以直接提交issues,将需要添加进列表的帐号及证据,如截图、Web Archive或推文链接(还是建议截图或Archive因为链接可能被删)提交到这里即可。如果不便展示ID也可私下联系我添加,我会将上面所说的内容公示,添加到列表中。
13 |
--------------------------------------------------------------------------------
/twidere/README.md:
--------------------------------------------------------------------------------
1 | # Twidere 过滤列表
2 |
3 | ## 列表介绍
4 |
5 | * `bots.xml`:机器人推文,如果你发现某个来源经常自动发送推文,可以添加到这里。
6 | * `harassment.xml`:使用提及、私信等骚扰用户,尤其是骚扰大量用户的。添加前请一定提供证据。
7 |
8 | ## 如何导入
9 | 在 Twidere - 过滤 - 设定 中添加订阅(功能待定)
10 |
11 | [在 Twidere 中订阅“机器人”过滤列表](http://twidere.mariotaku.org/external/filters/subscriptions/add?url=https%3A%2F%2Fraw.githubusercontent.com%2Fmariotaku%2Fwtb%2Fmaster%2Ftwidere%2Fbots.xml&name=%E6%9C%BA%E5%99%A8%E4%BA%BA)
12 |
13 | ## 文件格式
14 |
15 | ````xml
16 |
17 |
18 |
19 |
20 |
21 | SpamKeyword
22 |
23 | SpamApp Source
24 |
25 | spamsite.com
26 |
27 | ````
28 |
--------------------------------------------------------------------------------
/twidere/bots.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | IFTTT
4 | twittbot.net
5 | ツイ廃あらーと
6 | Foursquare
7 | グランブルー ファンタジー
8 | The Tweeted Times
9 | fllwrs
10 | Matome UserLocal
11 | niconico ニコレポ連携
12 |
13 |
--------------------------------------------------------------------------------
/twidere/filters.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/twidere/harassment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/twitter/README.md:
--------------------------------------------------------------------------------
1 | # wtb
2 |
3 | WHO TO BLOCK
4 |
5 | ## 使用方法
6 |
7 | 从Twitter Settings - Blocked accounts选择import from list
8 |
9 | ## 如何贡献
10 |
11 | ### 基本要求
12 |
13 | * Python 2.7.9+
14 | * 全局翻墙(其实可以用API代理不过效果未知)
15 | * 有效的Twitter Consumer Key/Secret,例如[这里](https://gist.github.com/mariotaku/5465786)
16 |
17 | **或者**
18 |
19 | 显示Twitter ID的客户端 ;)
20 |
21 | ### 操作步骤
22 |
23 | 1. 调用 `obtain_token.py` to get an application only token to access twitter
24 | 2. Call `show_twitter_id.py [name or url]` to get target user's twitter id
25 | 3. Add this ID to desired CSV file
26 | 4. Make a pull request
27 |
28 |
29 | ## 文件介绍
30 |
31 | | 文件名 | 描述 | 定义 |
32 | | :--: | :--: | :--: |
33 | | pink_\*.csv | 爱国小粉红 | 看起来像是平常微博的萌萌二次元,使用各种表情包 |
34 | | wumao_\*.csv | 五毛 | 传统意义上的五毛 |
35 | | pink_wumao\_\*.csv | 小粉红与五毛 | 既符合小粉红的特征又包含五毛特征的 |
36 |
37 |
38 | 如果有更多的类型,欢迎做出贡献。比如挺转基因组、反转基因组、中医粉组、中医黑组、爆照组、秀恩爱组。本repo旨在建立一个开放的,中立(雾)的,订阅列表。
39 |
--------------------------------------------------------------------------------
/twitter/maozi.csv:
--------------------------------------------------------------------------------
1 | 4866308776
2 | 4866403228
3 | 4866179297
4 | 4866407500
5 | 4866127877
6 | 4866714838
7 | 4866190247
8 | 4866327994
9 | 4866094739
10 | 4866017937
11 | 4866085193
12 | 4866212163
13 | 4866160960
14 | 4866157456
15 | 4866158927
16 | 4866143703
17 | 4866425974
18 | 4866068321
19 | 4866078665
20 | 4866075729
21 | 4866129585
22 | 4866041631
23 | 4866132717
24 | 4866184305
25 | 4866162521
26 | 4866313810
27 | 4866189430
28 | 4866126183
29 | 4866187450
30 | 4866192448
31 | 4866651845
32 | 4866203092
33 | 4866129633
34 | 4866352841
35 | 4866342131
36 | 4866253630
37 | 4866235066
38 | 4866323861
39 | 4866097073
40 | 4866335733
41 | 4866327993
42 | 4866247852
43 | 4866625078
44 | 4866325289
45 | 4866096071
46 | 4866073143
47 | 4866324628
48 | 4866712462
49 | 4866230782
50 | 4866096041
51 | 4866519557
52 | 4866101247
53 | 4866192377
54 | 4866157750
55 | 4866246279
56 | 4866200559
57 | 4866183646
58 | 4866199997
59 | 4866022371
60 | 4866509517
61 | 4866175360
62 | 4866143092
63 | 4866039855
64 | 4866326849
65 | 4866109707
66 | 4866129351
67 | 4866383993
68 | 4866294251
69 | 4866743901
70 | 4866244972
71 | 4866326110
72 | 4866110313
73 | 4866316066
74 | 4866271317
75 | 4866041247
76 | 4866140296
77 | 4866252117
78 | 4866096009
79 | 4866145450
80 | 4866233511
81 | 4866298929
82 | 4866210425
83 | 4866230747
84 | 4866372857
85 | 4866364960
86 | 4866243575
87 | 4866192695
88 | 4866195682
89 | 4866152123
90 | 4866211863
91 | 4866136588
92 | 4866400210
93 | 4866135298
94 | 4866257247
95 | 4866043743
96 | 4866429586
97 | 4866332026
98 | 4866172522
99 | 4866101849
100 | 4866580744
101 | 4866135381
102 | 4866312645
103 | 4866278943
104 | 4866341465
105 | 4866204549
106 | 4866209878
107 | 4866252551
108 | 4866692163
109 | 4866203673
110 | 4866267663
111 | 4866337463
112 | 4866300400
113 | 4866084045
114 | 4866432952
115 | 4866083571
116 | 4866184737
117 | 4866494194
118 | 4866249405
119 | 4866082173
120 | 4866131673
121 | 4866118871
122 | 4866121667
123 | 4866075957
124 | 4866343810
125 | 4866201917
126 | 4866114513
127 | 4866162268
128 | 4866121247
129 | 4866429172
130 | 4866335272
131 | 4866856696
132 | 4866327689
133 | 4866020049
134 | 4866279928
135 | 4866187973
136 | 4866172707
137 | 4866475739
138 | 4866342593
139 | 4866111357
140 | 4866358151
141 | 4866095715
142 | 4866404176
143 | 4866155512
144 | 4866198327
145 | 4866260757
146 | 4866193653
147 | 4866104897
148 | 4866157145
149 | 4866219592
150 | 4866437668
151 | 4866309723
152 | 4866195401
153 | 4866285011
154 | 4866174141
155 | 4866334211
156 | 4866311524
157 | 4866133877
158 | 4866016725
159 | 4866196402
160 | 4866275482
161 | 4866080565
162 | 4866198101
163 | 4866336869
164 | 4866439678
165 | 4866140003
166 | 4866449278
167 | 4866103701
168 | 4866562341
169 | 4866218111
170 | 4866363706
171 | 4866423202
172 | 4866066147
173 | 4866202342
174 | 4866182110
175 | 4866105477
176 | 4866409198
177 | 4866143602
178 | 4866247173
179 | 4866211697
180 | 4866069549
181 | 4866381323
182 | 4866135058
183 | 4866239123
184 | 4866075315
185 | 4866167073
186 | 4866374290
187 | 4866410722
188 | 4866424425
189 | 4866537454
190 | 4866283985
191 | 4866232510
192 | 4866255387
193 | 4866121805
194 | 4866364180
195 | 4866642135
196 | 4866272488
197 | 4866273027
198 | 4866065949
199 | 4866135190
200 | 4866163936
201 | 4866252699
202 | 4866145366
203 | 4866443728
204 | 4866040917
205 | 4866319078
206 | 4866192129
207 | 4866376223
208 | 4866269901
209 | 4866272571
210 | 4866116733
211 | 4866333531
212 | 4866420525
213 | 4866100469
214 | 4866427276
215 | 4866397732
216 | 4866361768
217 | 4866290380
218 | 4866218477
219 | 4866171345
220 | 4866267875
221 | 4866180857
222 | 4866124551
223 | 4866243226
224 | 4866348785
225 | 4866257482
226 | 4866232775
227 | 4866132047
228 | 4866173583
229 | 4866032607
230 | 4866187588
231 | 4866245639
232 | 4866204111
233 | 4866653573
234 | 4866053697
235 | 4866431782
236 | 4866132641
237 | 4866068147
238 | 4866190756
239 | 4866445126
240 | 4866336563
241 | 4866055191
242 | 4866193102
243 | 4866257542
244 | 4866226481
245 | 4866035163
246 | 4866251152
247 | 4866313029
248 | 4866206057
249 | 4866251355
250 | 4866026283
251 | 4866222533
252 | 4866057393
253 | 4866420112
254 | 4866493150
255 | 4866216844
256 | 4866338093
257 | 4866097745
258 | 4866322989
259 | 4866300453
260 | 4866059217
261 | 4866453226
262 | 4866258353
263 | 4866379571
264 | 4866022215
265 | 4866217749
266 | 4866163786
267 | 4866152746
268 | 4866119099
269 | 4866053193
270 | 4866046305
271 | 4866082697
272 | 4866039987
273 | 4866716758
274 | 4866366886
275 | 4866198076
276 | 4866561699
277 | 4866269050
278 | 4866473705
279 | 4866535678
280 | 4866714922
281 | 4866155842
282 | 4866253727
283 | 4866288743
284 | 4866186989
285 | 4866349277
286 | 4866131511
287 | 4866242799
288 | 4866326607
289 | 4866241227
290 | 4866162231
291 | 4866309135
292 | 4866329788
293 | 4866561129
294 | 4866197411
295 | 4866246976
296 | 4866412144
297 | 4866045879
298 | 4866285467
299 | 4866220277
300 | 4866424336
301 | 4866380715
302 | 4866129430
303 | 4866170248
304 | 4866287495
305 | 4866159129
306 | 4866379409
307 | 4866095129
308 | 4866254201
309 | 4866074261
310 | 4866069243
311 | 4866347062
312 | 4866218134
313 | 4866046617
314 | 4866129021
315 | 4866388367
316 | 4866756892
317 | 4866469581
318 | 4866166665
319 | 4866438034
320 | 4866119001
321 | 4866369149
322 | 4866155279
323 | 4866149759
324 | 4866358799
325 | 4866115197
326 | 4866271073
327 | 4866311344
328 | 4866325366
329 | 4866175317
330 | 4866209123
331 | 4866172665
332 | 4866256804
333 | 4866137687
334 | 4866156490
335 | 4866343024
336 | 4866085971
337 | 4866297393
338 | 4866215151
339 | 4866246058
340 | 4866157660
341 | 4866197051
342 | 4866160457
343 | 4866345377
344 | 4866164927
345 | 4866578110
346 | 4866151204
347 | 4866145474
348 | 4866642063
349 | 4866289277
350 | 4866198346
351 | 4866054981
352 | 4866164104
353 | 4866049533
354 | 4866315136
355 | 4866233643
356 | 4866311315
357 | 4866042633
358 | 4866654443
359 | 4866203494
360 | 4866298925
361 | 4866377265
362 | 4866385043
363 | 4866426135
364 | 4866085533
365 | 4866335753
366 | 4866321789
367 | 4866027927
368 | 4866159327
369 | 4866185009
370 | 4866195171
371 | 4866056937
372 | 4866274163
373 | 4866198886
374 | 4866272578
375 | 4866053523
376 | 4866583150
377 | 4866220887
378 | 4866133097
379 | 4866331407
380 | 4866314212
381 | 4866196840
382 | 4866390988
383 | 4866355216
384 | <<<<<<< HEAD:maozi.csv
385 | 4866126183
386 | 4866037851
387 | 4866098409
388 | 4866126183
389 | 4866284187
390 | 4866138989
391 | 4867251423
392 | 4866120791
393 | 4866219621
394 | 4866189071
395 | 4866218967
396 | 4866048315
397 | 4866322282
398 | 4866191537
399 | 4866068831
400 | 4866197555
401 | 4866099567
402 | 4866137356
403 | 4583477532
--------------------------------------------------------------------------------
/twitter/pink_1.csv:
--------------------------------------------------------------------------------
1 | 4815148223
2 | 4778176207
3 | 4824140458
4 | 4778534054
5 | 4773377334
6 | 3308866230
7 | 4771590666
8 | 4777456356
9 | 2171900430
10 | 4757096052
11 | 4773806233
12 | 4210569552
13 | 1587256394
14 | 878537338279923714
15 |
--------------------------------------------------------------------------------
/twitter/pink_wumao_1.csv:
--------------------------------------------------------------------------------
1 | 4815148223
2 | 4778176207
3 | 4824140458
4 | 4778534054
5 | 4773377334
6 | 3308866230
7 | 4771590666
8 | 4777456356
9 | 2171900430
10 | 4757096052
11 | 758586333203955712
12 | 4777629319
13 | 888991396354441216
14 | 832975764647665664
15 | 758586333203955712
16 | 833412092430462976
17 | 850295918175891456
18 | 721303486315368449
19 | 832739599969443840
20 | 887574198507286528
21 | 17733542
22 | 763434160228675584
23 | 835715257
24 | 3299056058
25 | 871408666557022209
26 | 875359189899530240
27 | 814476621230981121
28 | 857792581945532417
29 | 886472527404347392
30 | 847766177858207744
31 | 802543951156609024
32 | 888237324869357570
33 | 886201263641157632
34 | 893848079945748480
35 | 884606192781111296
36 | 851083492960067584
37 | 814476621230981121
38 | 891858505677717504
39 | 864606698907906048
40 | 878244955793244160
41 | 890085186863583232
42 | 885407014976757761
43 | 52695406
44 | 701181157
45 | 874131297915985920
46 | 886185841780940800
47 | 875324023449759744
48 | 886081672029945856
49 | 857769359371980800
50 | 886051606982254592
51 | 3299056058
52 | 721149860578201601
53 | 833412092430462976
54 | 882153348819894272
55 | 886201263641157632
56 | 888296284234199040
57 | 888443599054028800
58 | 888991396354441216
59 | 886790651844612098
60 | 873459669305401348
61 | 881349123789570048
62 | 851391255720239105
63 | 879026443853983744
64 | 781280949464031232
65 | 872086215037784064
66 | 886758261109604352
67 | 879789312602144768
68 | 869350182135111680
69 | 877831074658738176
70 | 878632641926373376
71 | 876467173211856897
72 | 875226716729430016
73 | 882888243775029248
74 | 875065054319828992
75 | 883539360670515200
76 | 871603644075884544
77 | 606050812
78 | 721303486315368449
79 | 876240699053580288
80 | 881919374856044544
81 | 827491709332230144
82 | 838992543509426177
83 | 876748676416159744
84 | 875973599881945088
85 | 4430862192
86 | 868682728333553664
87 | 871936570307125248
88 | 3987651734
89 | 17733542
90 | 820156060375748608
91 | 824476780165820417
92 | 820834737728012289
93 | 813753841892159489
94 | 870640358421483520
95 | 862848221370097665
96 | 851702134911361024
97 | 490510370
98 | 843396158445690880
99 | 864353944771805184
100 | 829666330525589505
101 | 833306369168068610
102 | 831422885264707584
103 | 838047553773953025
104 | 825673145881227264
105 | 373706037
106 | 754171866202435585
107 | 846997692257619970
108 | 890095256150183941
109 | 857541052881874944
110 | 858233591217537025
111 | 858200512822296576
112 | 741664754511417344
113 | 889945201266929664
114 | 894880639563911168
115 | 839168593388449792
116 | 851606977893421056
117 | 891111987333054464
118 | 3304128223
119 | 771440011
120 | 893194853550567424
121 | 859315852901875712
122 | 823337175089430529
123 | 778994614023884801
124 | 818002564918542337
125 | 840068795968307200
126 | 862192085251661824
127 | 892041490511167490
128 | 873419245509427200
129 | 785793793031344128
130 | 886969693797351425
131 | 892717623250567168
132 | 890234758566989824
133 | 878473875813679104
134 | 2681436217
135 | 891322632632651776
136 | 891927802127241216
137 | 879627344305991680
138 | 893006087795875840
139 | 892348461441400832
140 | 890102793708724225
141 | 872302087266328577
142 | 3063789760
143 | 895430197809364993
144 | 873801923236839425
145 | 810034083728343040
146 | 712215569424982016
147 | 772691021104754688
148 | 884354946455425024
149 | 883275736538161152
150 | 623831049
151 | 812171340245532673
152 | 898627327411732480
153 | 887712145982472193
154 | 490172241
155 | 898543428383850496
156 | 885485396674592768
157 | 758259890125025281
158 | 895630622760161280
159 | 826989229037088768
160 | 898225290748379136
161 | 872907751197884416
162 | 896910732427640833
163 | 895978612775542785
164 | 888883115136921601
165 | 895173305740689408
166 | 888432552171552768
167 | 899262531046453248
168 | 502986545
169 | 887841865789095936
170 | 1261237934
171 | 811283664457723904
172 | 897102571030028289
173 | 01940081431486465
174 | 850650294203465728
175 | 895061769680322561
176 | 887600708370944000
177 | 900727896020443137
178 |
--------------------------------------------------------------------------------
/twitter/scripts/obtain_token.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 |
3 | import argparse
4 | import urllib
5 | import urllib2
6 | import urlparse
7 | import base64
8 | import json
9 | import sys
10 |
11 | parser = argparse.ArgumentParser(description='Obtain access token from Twitter')
12 |
13 | parser.add_argument('-c', '--consumer-key', action='store', dest='consumer_key', help='Consumer key')
14 | parser.add_argument('-s', '--consumer-secret', action='store', dest='consumer_secret', help='Consumer key')
15 | parser.add_argument('-u', '--api-url', action='store', dest='api_url', help='API URL',
16 | default='https://api.twitter.com')
17 |
18 | if len(sys.argv) == 1:
19 | sys.argv.append('--help')
20 |
21 | args = parser.parse_args()
22 |
23 | if not args.consumer_key or not args.consumer_secret:
24 | parser.error('Consumer key and consumer secret required')
25 | exit()
26 |
27 | auth_header = 'Basic %s' % base64.urlsafe_b64encode('%s:%s' % (args.consumer_key, args.consumer_secret))
28 |
29 | url = urlparse.urljoin(args.api_url, 'oauth2/token')
30 | req = urllib2.Request(url, data=urllib.urlencode({'grant_type': 'client_credentials'}),
31 | headers={'Authorization': auth_header})
32 | access_token = json.load(urllib2.urlopen(req))['access_token']
33 |
34 | with open('.twitter_token', 'w') as f:
35 | f.write(access_token)
36 |
37 | print 'Now you can use other twitter scripts.'
38 |
--------------------------------------------------------------------------------
/twitter/scripts/show_twitter_id.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 |
3 | import argparse
4 | import json
5 | import re
6 | import urllib
7 | import urllib2
8 | import urlparse
9 | import sys
10 |
11 | if len(sys.argv) == 1:
12 | sys.argv.append('--help')
13 |
14 | token = None
15 |
16 | with open('.twitter_token') as f:
17 | token = f.readline()
18 |
19 | if not token:
20 | print 'No token, use obtain_token first'
21 | exit()
22 |
23 | parser = argparse.ArgumentParser(description='Show user ID corresponding to @screenname or url')
24 |
25 | parser.add_argument('name_or_url', help='@screenname or url')
26 | parser.add_argument('-u', '--api-url', action='store', dest='api_url', help='API URL',
27 | default='https://api.twitter.com')
28 |
29 | args = parser.parse_args()
30 |
31 | screen_name = None
32 |
33 | m = re.match('^((https?://)?(www\.)?twitter\.com/)?(@|#!/)?([A-Za-z0-9_]{1,15})(/([-a-z]{1,20}))?$', args.name_or_url)
34 | if m:
35 | screen_name = m.group(5)
36 | else:
37 | print 'Invalid name or url'
38 | exit()
39 |
40 | auth_header = 'Bearer %s' % token
41 |
42 | url = urlparse.urljoin(args.api_url, '1.1/users/show.json?%s' % urllib.urlencode({'screen_name': screen_name}))
43 | req = urllib2.Request(url, headers={'Authorization': auth_header})
44 |
45 | user = json.load(urllib2.urlopen(req))
46 |
47 | print user['id_str']
48 |
--------------------------------------------------------------------------------
/twitter/wumao_1.csv:
--------------------------------------------------------------------------------
1 | 4773465218
2 | 4776226321
3 | 4757096052
4 | 134818082
5 | 4793716093
--------------------------------------------------------------------------------