Skip to content

Instantly share code, notes, and snippets.

@Fatpandac
Last active March 4, 2022 15:20
Embed
What would you like to do?
Github Blocker
import requests
import json
github_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
headers = { 'Authorization': 'token ' + github_token }
data_url = 'https://raw.githubusercontent.com/sxzz/github-block-tool/main/analyze.json'
get_data = lambda : json.loads(requests.get(data_url).text)
get_user_name = lambda data: list(map(lambda x: x['username'], data))
block_user = lambda user_name: requests.put('https://api.github.com/user/blocks/' + user_name, headers=headers)
def main():
user_name = get_user_name(get_data())
for name in user_name:
status = block_user(name).status_code
if (status == 204):
print(f'@{name} is blocked')
elif (status == 404):
print(f'@{name} is not exist')
elif (status == 422):
print(f'@{name} is already blocked')
else:
print(f'@{name} with status code {status}')
if __name__ == '__main__':
main()
@niices is not blocked
@FatherOfAmerican is blocked
@JulesCesar is blocked
@cnmade is blocked
@v-limc is blocked
@likeSo is blocked
@zhaoxinnnn is blocked
@lovesyxfuffy is blocked
@MolueJames is blocked
@WPolly is blocked
@renkaige5 is blocked
@1273082756 is blocked
@1120040377 is blocked
@Toni-Stark is blocked
@lixiaoqqq is blocked
@Yangxiucheng1002 is blocked
@leeson1995 is blocked
@Mercle-Liang is blocked
@764347514 is blocked
@expeditionist-cj is blocked
@TTTTimor is blocked
@limengyao is blocked
@NightHawk6699 is blocked
@changzhn is blocked
@454646083 is blocked
@colossalleaf is blocked
@space-open is blocked
@LiXiangYu is blocked
@mayufo is blocked
@zachgenius is blocked
@HBaylor is blocked
@bayshier is blocked
@zhenquan321 is blocked
@yinhunfeixue is blocked
@dcy0701 is blocked
@helptome1 is blocked
@elrondliu is blocked
@aye10031 is blocked
@sxc20181120 is blocked
@Dante-dan is blocked
@rainlotus97 is blocked
@dushaobindoudou is blocked
@fernandoxu is blocked
@StarLevi is blocked
@ChangeHowRan is blocked
@atlasW is blocked
@ybj1997 is blocked
@wilsunson is blocked
@mRuoQue is blocked
@lonelysunshine is blocked
@xueqingxiao is blocked
@lwz1761 is blocked
@codedoge0619 is blocked
@jll410206801 is blocked
@wwx441476 is blocked
@dupengdl is blocked
@VincentCh01 is blocked
@JeffreyBool is blocked
@ouzhou is blocked
@lyx0224 is blocked
@b0123456789 is blocked
@lastYoueven is blocked
@guojunliu is blocked
@BlinkZF is blocked
@kfxiaoxia is blocked
@RalapChen is blocked
@hqykl is blocked
@scofield09 is blocked
@SunsetW is blocked
@colordove is blocked
@bgwd666 is blocked
@woshithb is blocked
@qq476286840 is blocked
@shen774411223d is blocked
@TheMenLikeWind is blocked
@liaotuo is blocked
@riminggit is blocked
@a120610114 is blocked
@haipengzzz is blocked
@YHGod is blocked
@JavenLaw is blocked
@likyh is blocked
@VyaWave is blocked
@xiaohuan1993 is blocked
@cdcjccd is blocked
@Tsui0527 is blocked
@hanshuo950918 is blocked
@loveharuhi is blocked
@shen931205 is blocked
@One1W is blocked
@jozhi is blocked
@hpc1071123837 is blocked
@YxJaycexY is blocked
@yjqvip8 is blocked
@ajzeng2020 is blocked
@DDGssdlp is blocked
@lzzandsx is blocked
@yuu2lee4 is blocked
@niming175 is blocked
@zhangjinglearning is blocked
@dlj0906 is blocked
@Thanatos-JFJ is blocked
@HW-2111456060 is blocked
@dai-chao is blocked
@dinghui-wang is blocked
@abuyao is blocked
@Willmind is blocked
@lanningsix is blocked
@liigoo is blocked
@wangbs95 is blocked
@yesemenglong is blocked
@longshao512 is blocked
@shixuhui-i is blocked
@lixiaotian2354341623 is blocked
@eumenidesk is blocked
@BuzzWoods is blocked
@moyui is blocked
@Yanzengyong is blocked
@ZeroEarl is blocked
@river-hu is blocked
@lhbDesign is blocked
@YasuoHub is blocked
@minchina is blocked
@zhongmeizhi is blocked
@KayvorGwen is blocked
@cyrilluce is blocked
@shuaohan991205 is blocked
@gitwahaha is blocked
@6ZILIULIU is blocked
@ijero is blocked
@fueen is blocked
@sunjianfengHub is blocked
@Niefee is blocked
@SekiBetu is blocked
@Heartfilia is blocked
@kongxiangrun is blocked
@krislc is blocked
@JacketLWJ is blocked
@Blankj is blocked
@supportUkr is blocked
@ThinkRealize is blocked
@chengjiaxin5 is blocked
@PromiseYo is blocked
@70yyds is blocked
@lhf6623 is blocked
@wwhai is blocked
@plutojia is blocked
@Michael18811380328 is blocked
@ysyfff is blocked
@xindiyang is blocked
@jay920509 is blocked
@bbc-594 is blocked
@yinluno1 is blocked
@qzhai is blocked
@Siricee is blocked
@jinghuafeng is blocked
@Ez-21 is blocked
@qq20004604 is blocked
@Skyzhanyou is blocked
@leochan2017 is blocked
@phasedarray is blocked
@xiaoxigua-web is blocked
@noob-ceng is blocked
@SaltFish001 is blocked
@impwj is blocked
@eatmoreapple is blocked
@NickLoveHub is blocked
@zhy531017132 is blocked
@wind108369 is blocked
@penglimin is blocked
@chunyao is blocked
@WangRuiZhi is blocked
@wlgemini is blocked
@Bu-Chuan is blocked
@likaiji is blocked
@liwangyong is blocked
@wangJiaLun-china is blocked
@zksauren is blocked
@2657086519 is blocked
@wayward-man is blocked
@tanhuagt is blocked
@wangxxxb is blocked
@xinx1n is blocked
@selfshore is blocked
@Bosn is blocked
@wuweijian1997 is blocked
@togoog is blocked
@AccompanyZiHao is blocked
@codeLiZhiXu is blocked
@showsmall is blocked
@lingyun820 is blocked
@xiaochangbai is blocked
@slboy is blocked
@Zss96 is blocked
@qlusunshine is blocked
@RizhaoCai is blocked
@lostmariah is blocked
@youjiaqi421 is blocked
@sunYEAN is blocked
@guowei-gong is blocked
@zycforgithub is blocked
@VoithVon is blocked
@tjuchen is blocked
@ZerroRt is blocked
@chenjielinyu is blocked
@portgo is blocked
@hasXSS is blocked
@64xi is blocked
@arukas is blocked
@chenhuang444 is blocked
@llzy521 is blocked
@buptsc is blocked
@imaxing is blocked
@WhiteDragon29 is blocked
@Hi-lone is blocked
@zhuxiaoge888 is blocked
@juanfu1997 is blocked
@awefeng is blocked
@unclepan is blocked
@632781460 is blocked
@TrustDec is blocked
@wsx864321 is blocked
@WyfGithub is blocked
@cuimaomao0123 is blocked
@K-Philleani is blocked
@AlexFanw is blocked
@charlesXu86 is blocked
@GeniusBrother is blocked
@guoshidu is blocked
@OnlyForYouYaner is blocked
@Tomcater is blocked
@VincentChengzc is blocked
@leglars is blocked
@ruomanwei is blocked
@fangker is blocked
@wangweizm is blocked
@fengci is blocked
@muoshuosha is blocked
@GJW666888 is blocked
@Songyakang is blocked
@exposir is blocked
@Minitiai is blocked
@Zddu is blocked
@aipame is blocked
@xiebanglong is blocked
@BoatGina is blocked
@MoreGOING is blocked
@collery is blocked
@destLonY is blocked
@sumcets is blocked
@Leridy is blocked
@wxxcarl is blocked
@zhihongzhong is blocked
@zwht is blocked
@sleepyfive is blocked
@WestarkMFF is blocked
@coderzym is blocked
@kumfo is blocked
@doresearch is blocked
@pengzexuan2001 is blocked
@asd116725 is blocked
@hulalaroom is blocked
@VerneZhong is blocked
@weiqiangChow is blocked
@coderjinhui is blocked
@littleylv is blocked
@VVVVxs is blocked
@songhe2136 is blocked
@812756473 is blocked
@PleasePerfunctory is blocked
@zhh10 is blocked
@Hahahaooovvv is blocked
@Yumwey is blocked
@cdll is blocked
@HuXin957 is blocked
@0x219 is blocked
@qiansc is blocked
@Can-Chen is blocked
@lvbaiying is blocked
@qyqcswill is blocked
@lazycat92 is blocked
@Eve-Sama is blocked
@MapleLove2014 is blocked
@Lixianlai-2 is blocked
@jsczrangel is blocked
@bibi7 is blocked
@Tliens is blocked
@jantimon is blocked
@salazarm is blocked
@snakepoongmail is blocked
@sebmarkbage is blocked
@LeroyPine is blocked
@zaqmjuop is blocked
@OnClick9927 is blocked
@WensonZhuang is blocked
@Hencky is blocked
@dockercore is blocked
@mooncakedevop is blocked
@rijieli is blocked
@IUIUIU is blocked
@sillysillyc is blocked
@Julianayy is blocked
@hold-baby is blocked
@Billy-HFC is blocked
@Shimada666 is blocked
@QAQwow is blocked
@Dev-Wiki is blocked
@springHa is blocked
@ChenhLiwnl is blocked
@cbl980226 is blocked
@xbini is blocked
@yangfuzhi is blocked
@yd613 is blocked
@JunyWuuuu91 is blocked
@w3cmark is blocked
@echoechoin is blocked
@nanwangjkl is blocked
@xuchendev is blocked
@qyingkou is blocked
@dockcask is blocked
@Rile14929 is blocked
@dandananddada is blocked
@nextdoorUncleLiu is blocked
@Williamlook is blocked
@zhaojianHub is blocked
@chua1989 is blocked
@wjdxy172816 is blocked
@SAFEluren is blocked
@roseduan is blocked
@ShinChven is blocked
@YoungMrWang is blocked
@XJP-GIT is blocked
@kael777 is blocked
@wanghanwanghan is blocked
@l64848810 is blocked
@TheCokeCat is blocked
@ghost is blocked
@shangraochq is blocked
@caidapao is blocked
@ASWLaunchs is blocked
@hh-sea is blocked
@mqliutie is blocked
@ThreeCatsLoveFish is blocked
@toyobayashi is blocked
@mahongran is blocked
@MhuiHugh is blocked
@jasen666 is blocked
@imtaotao is blocked
@particlec is blocked
@saion0309 is blocked
@swchenxixi is blocked
@YuizhiCode is blocked
@tangbl-code is blocked
@hvag-ab is blocked
@sj-1994 is blocked
@haojieya is blocked
@6272873 is blocked
@hidetodong is blocked
@cl-cc is blocked
@whylisa is blocked
@loadingwyn is blocked
@panyanxin is blocked
@YUHOU0012 is blocked
@zhaoyongjie is blocked
@isJx is blocked
@shaoqiang6 is blocked
@a10255asd is blocked
@soul-of-code is blocked
@OWRIG is blocked
@hancao97 is blocked
@shensai06 is blocked
@TongOS is blocked
@Memoyu is blocked
@Mao5211 is blocked
@hxingpax is blocked
@Jasmine-Mei is blocked
@MrStrangeBao is blocked
@tdouguo is blocked
@theewind is blocked
@YSOcean is blocked
@liulei9311230 is blocked
@xiaoma-FrontEnd is blocked
@Xinbaiyu is blocked
@DescLee is blocked
@dawpf is blocked
@jzhupup is blocked
@renwavewave is blocked
@linyuxian is blocked
@simonqianvip is blocked
@Mustang-Galaxy is blocked
@pyh996 is blocked
@supergithuber is blocked
@jevonsflash is blocked
@maple-du is blocked
@songshiquan is blocked
@xwenliang is blocked
@serendipityApe is blocked
@Neil1223 is blocked
@Emily-0616 is blocked
@wayne0201 is blocked
@Boy-WuHen is blocked
@tommy0607 is blocked
@MarvinZhou98 is blocked
@MrHuangJser is blocked
@HanseyChan is blocked
@sakmon is blocked
@YUFENGWANG is blocked
@zhaohuanyuu is blocked
@qiang520184 is blocked
@awesome-long is blocked
@penguin0731 is blocked
@oilweng is blocked
@Cnm-mgg is blocked
@SomeoneDeng is blocked
@Dustin02 is blocked
@endless-z is blocked
@withwind109 is blocked
@kangzhaorui is blocked
@crush2020 is blocked
@Vhibli is blocked
@vk-auw628 is blocked
@meablelee2013 is blocked
@shaofuzhang is blocked
@gobkc is blocked
@raylinhonghu is blocked
@jylhuhuhu is blocked
@rubbishmaker is blocked
@gz227 is blocked
@carrieBlock is blocked
@msidolphin is blocked
@Void-YY is blocked
@liuleill is blocked
@lauhuawei is blocked
@yutao331763646 is blocked
@pro-xiaoy is blocked
@FontEndArt is blocked
@egbertwong is blocked
@wineSu is blocked
@fubd is blocked
@robbiemie is blocked
@sauron0914 is blocked
@tao1991123 is blocked
@EastStarCrow is blocked
@oxygen1999 is blocked
@gundagai is blocked
@almostless is blocked
@luoguoxiong is blocked
@weihubeats is blocked
@jackzhangrunze is blocked
@hihanley is blocked
@kreviazuk is blocked
@royeyu is blocked
@JackLiu0001 is blocked
@Yang-066 is blocked
@PikachuGits is blocked
@sun-iot is blocked
@jumodada is blocked
@windowdotonload is blocked
@wmb0412 is blocked
@eps1lon is blocked
@devcui is blocked
@Lee94 is blocked
@Aeolos1994 is blocked
@chenzezhang is blocked
@cnoder-wgh is blocked
@wusb is blocked
@YoungLightMing is blocked
@cnywt is blocked
@pomelovico is blocked
@yichen454 is blocked
@liuqh0609 is blocked
@init-center is blocked
@gggso is blocked
@RandolphCYG is blocked
@z-bai is blocked
@fengtomy is blocked
@Mark24Code is blocked
@watsonhaw5566 is blocked
@ZoeLeee is blocked
@ShopkeeperEgg is blocked
@nqdy666 is blocked
@zhangshengran is blocked
@iolh is blocked
@TingYinHelen is blocked
@Channing-Huang is blocked
@Jack-rainbow is blocked
@Month7 is blocked
@yisar is blocked
@CreazyJack is blocked
@kirainmoe is blocked
@CFMJ is blocked
@willx12123 is blocked
@Huxpro is blocked
@Z1hgq is blocked
@Utahenrichment is blocked
@bvaughn is blocked
@sizebot is blocked
@lunaruan is blocked
@Mike2l8 is blocked
@sanjeevyadavIT is blocked
@MuhammedKpln is blocked
@kyle-ssg is blocked
@DrOverbuild is blocked
@gitrthanki1 is blocked
@mmarkelov is blocked
@jeongwoopark0514 is blocked
@ye1dos is blocked
@sammy-SC is blocked
@xialvjun is blocked
@mbest is blocked
@derzwen is blocked
@facebook-github-bot is blocked
@codesandbox[bot] is not blocked
@swissspidy is blocked
@dvoytenko is blocked
@gaearon is blocked
@whatisaphone is blocked
@MatthijsBon is blocked
@georeith is blocked
@stale[bot] is not blocked
@andrenanninga is blocked
@vojtech-dobes is blocked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment