├── en.png ├── zh.png ├── overall_300x649.png ├── README.md ├── randomUnsplash.js ├── progress.js ├── exchangeRate.js ├── weibo.js ├── subscribe ├── twitter.js ├── football .js ├── footballMatch_zh.js ├── rankingsGoals.js ├── matchDay.js └── footballLeagueData /en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Juniorchen2012/scriptable/HEAD/en.png -------------------------------------------------------------------------------- /zh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Juniorchen2012/scriptable/HEAD/zh.png -------------------------------------------------------------------------------- /overall_300x649.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Juniorchen2012/scriptable/HEAD/overall_300x649.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # scriptable 2 | scriptable scripts works with scriptable app on ios https://scriptable.app/ 3 | ## Scripts count: 10 4 | ## Random Unsplash Scripts 5 | #### twitter follower count(Twitter粉丝数). 6 | #### random Unsplash Pic Script ,you can set keyword by widget parameter(随机网络图片). 7 | #### football script show Premier League tables(五大联赛积分榜). 8 | #### progress script show time have gone progress in today, this week and so on(时间进度). 9 | #### exchange script show currency exchangerate(最新汇率). 10 | #### weibo script show weibo hot search keywords(微博热搜). 11 | #### football_zh script show football game schedul(中超 英超 西甲赛程). 12 | #### matchday script show football competitions of popular leagues(五大联赛赛程) 13 | #### goalsranking script show goals ranking data.(最佳射手榜) 14 | #### subscribe script show subscribrition left time.(订阅服务进度) 15 | 16 | # All scripts in pic can been found 17 | 18 | ![widget](https://github.com/Juniorchen2012/scriptable/blob/master/overall_300x649.png?raw=true) 19 | ![widget](https://github.com/Juniorchen2012/scriptable/blob/master/en.png?raw=true) 20 | ![widget](https://github.com/Juniorchen2012/scriptable/blob/master/zh.png?raw=true) 21 | -------------------------------------------------------------------------------- /randomUnsplash.js: -------------------------------------------------------------------------------- 1 | var keyword="iPhone" 2 | if(args.widgetParameter){ 3 | keyword=args.widgetParameter 4 | } 5 | const result=await get({url:"https://api.unsplash.com/search/photos?page=2&per_page=20&query="+keyword+"&collections&orientation=portrait",headers:{"Accept-Encoding": "gzip, deflate, br","Accept-Language": "zh-cn","Authorization": "Client-ID 9657b2982a53f8bf4b567fe7899da7354456296f0d91a2f918a1bbcfec8a021e","Connection": "keep-alive","Cookie": "ugid=12cbed22cf668302ec43f4b7536e66235337523","Host": "api.unsplash.com","User-Agent": "Unsplash/73 CFNetwork/1197 Darwin/20.0.0",}}) 6 | 7 | const total=result.results.length 8 | const index=Math.floor(Math.random()*total) 9 | const imgUrl=result.results[index].urls.regular 10 | const req = await new Request(imgUrl); 11 | const img = await req.loadImage(); 12 | const w = new ListWidget() 13 | w.backgroundImage=img 14 | w.url=imgUrl 15 | let widget = w 16 | Script.setWidget(widget) 17 | Script.complete() 18 | w.presentMedium() 19 | 20 | async function get(opts) { 21 | const request = new Request(opts.url) 22 | request.headers = { 23 | ...opts.headers, 24 | ...this.defaultHeaders 25 | } 26 | var result=await request.loadJSON() 27 | console.log(result) 28 | return result 29 | 30 | } 31 | -------------------------------------------------------------------------------- /progress.js: -------------------------------------------------------------------------------- 1 | // progress 2 | const width=125 3 | const h=5 4 | const w = new ListWidget() 5 | w.backgroundColor=new Color("#222222") 6 | 7 | const now = new Date() 8 | const weekday = now.getDay() == 0 ? 6 : now.getDay() - 1 9 | const minutes=now.getMinutes() 10 | if(Device.locale() == "zh_CN"){ 11 | getwidget(24*60, (now.getHours() + 1)*60+minutes, "今日") 12 | getwidget(7, weekday + 1, "本周") 13 | getwidget(30, now.getDate() + 1, "本月") 14 | getwidget(12, now.getMonth() + 1, "今年") 15 | }else{ 16 | 17 | getwidget(24*60, (now.getHours() + 1)*60+minutes, "Today") 18 | getwidget(7, weekday + 1, "This week") 19 | getwidget(30, now.getDate() + 1, "This month") 20 | getwidget(12, now.getMonth() + 1, "This year") 21 | } 22 | Script.setWidget(w) 23 | Script.complete() 24 | w.presentMedium() 25 | 26 | function getwidget(total, haveGone, str) { 27 | const titlew = w.addText(str) 28 | titlew.textColor = new Color("#e587ce") 29 | titlew.font = Font.boldSystemFont(13) 30 | w.addSpacer(6) 31 | const imgw = w.addImage(creatProgress(total,haveGone)) 32 | imgw.imageSize=new Size(width, h) 33 | w.addSpacer(6) 34 | } 35 | 36 | function creatProgress(total,havegone){ 37 | const context =new DrawContext() 38 | context.size=new Size(width, h) 39 | context.opaque=false 40 | context.respectScreenScale=true 41 | context.setFillColor(new Color("#48484b")) 42 | const path = new Path() 43 | path.addRoundedRect(new Rect(0, 0, width, h), 3, 2) 44 | context.addPath(path) 45 | context.fillPath() 46 | context.setFillColor(new Color("#ffd60a")) 47 | const path1 = new Path() 48 | path1.addRoundedRect(new Rect(0, 0, width*havegone/total, h), 3, 2) 49 | context.addPath(path1) 50 | context.fillPath() 51 | return context.getImage() 52 | } 53 | 54 | -------------------------------------------------------------------------------- /exchangeRate.js: -------------------------------------------------------------------------------- 1 | // Variables used by Scriptable. 2 | // These must be at the very top of the file. Do not edit. 3 | // icon-color: red; icon-glyph: dollar-sign; 4 | // {"CAD":1.5542,"HKD":9.1412,"ISK":162.8,"PHP":57.083,"DKK":7.4422,"HUF":356.28,"CZK":27.11,"AUD":1.6405,"RON":4.8715,"SEK":10.42,"IDR":17340.01,"INR":86.1985,"BRL":6.5796,"RUB":90.9413,"HRK":7.5765,"JPY":124.95,"THB":36.629,"CHF":1.0773,"SGD":1.5986,"PLN":4.4702,"BGN":1.9558,"TRY":9.3279,"CNY":7.9047,"NOK":10.8623,"NZD":1.7821,"ZAR":19.4315,"USD":1.1795,"MXN":25.0833,"ILS":3.9859,"GBP":0.91167,"KRW":1350.52,"MYR":4.8808} 5 | 6 | const w = new ListWidget() 7 | w.backgroundColor = new Color("#222222") 8 | // const req = new importModule("Env")() 9 | const resp= await get({url:"https://api.exchangeratesapi.io/latest?symbols=CNY,GBP,CAD,RUB,JPY,AUD&base=USD"}) 10 | // symbols=CNY,GBP& 11 | for(let rate in resp.rates){ 12 | // console.log(rate) 13 | // console.log(resp.rates[rate]) 14 | const stack =w.addStack() 15 | stack.centerAlignContent() 16 | const img= await loadImage("https://www.ecb.europa.eu/shared/img/flags/"+rate+".gif") 17 | const imgw =stack.addImage(img) 18 | imgw.imageSize=new Size(20, 20) 19 | stack.addSpacer(10) 20 | stack.addText(rate) 21 | stack.addSpacer(10) 22 | const textw = stack.addText(resp.rates[rate].toFixed(2)) 23 | stack.addSpacer(5) 24 | } 25 | 26 | Script.setWidget(w) 27 | Script.complete() 28 | w.presentSmall() 29 | async function get(opts) { 30 | const request = new Request(opts.url) 31 | request.headers = { 32 | ...opts.headers, 33 | ...this.defaultHeaders 34 | } 35 | var result=await request.loadJSON() 36 | console.log(result) 37 | return result 38 | 39 | } 40 | 41 | async function loadImage(imgUrl) { 42 | let req = new Request(imgUrl) 43 | let image = await req.loadImage() 44 | return image 45 | } 46 | -------------------------------------------------------------------------------- /weibo.js: -------------------------------------------------------------------------------- 1 | var url='https://api.weibo.cn/2/!/search/hot_word?sid=v_widget&source=5786724301' 2 | const json=await get({'url':url}) 3 | const w = new ListWidget() 4 | const bgColor = new LinearGradient() 5 | bgColor.colors = [new Color("#1c1c1c"), new Color("#29323c")] 6 | bgColor.locations = [0.0, 1.0] 7 | w.backgroundColor = new Color("#222222") 8 | var page=1 9 | // if(args.widgetParameter!=""){ 10 | page=args.widgetParameter 11 | // } 12 | const pagesize=8 13 | var i=(page-1)*pagesize 14 | for (var item of json.data){ 15 | 16 | if(i==page*pagesize){ 17 | break 18 | } 19 | const stack = w.addStack() 20 | stack.centerAlignContent() 21 | const ydLine = stack.addText(item.id+' '+item.word) 22 | ydLine.font=Font.systemFont(15) 23 | ydLine.textColor = new Color("#e587ce") 24 | ydLine.textOpacity = 0.7 25 | // ydLine.url=item.app_query_link 26 | ydLine.url='sinaweibo://searchall?q='+encodeURI(item.word)+"" 27 | // const num=stack.addText(item.num) 28 | // num.font=Font.systemFont(10) 29 | // num.textColor = new Color("#e587ce") 30 | // num.textOpacity = 0.7 31 | if(item.flag_link.length){ 32 | stack.addSpacer(2) 33 | const image = await loadImage(item.flag_link) 34 | 35 | const imgWiget=stack.addImage(image) 36 | imgWiget.imageSize=new Size(20, 15) 37 | } 38 | // console.log(ydLine.url) 39 | i++ 40 | } 41 | // if (config.runsInWidget) { 42 | let widget = w 43 | Script.setWidget(widget) 44 | Script.complete() 45 | // }else( 46 | w.presentMedium() 47 | 48 | async function get(opts) { 49 | const request = new Request(opts.url) 50 | request.headers = { 51 | ...opts.headers, 52 | ...this.defaultHeaders 53 | } 54 | var result=await request.loadJSON() 55 | console.log(result) 56 | return result 57 | 58 | } 59 | 60 | async function loadImage(imgUrl) { 61 | let req = new Request(imgUrl) 62 | let image = await req.loadImage() 63 | return image 64 | } 65 | // ) 66 | -------------------------------------------------------------------------------- /subscribe: -------------------------------------------------------------------------------- 1 | // progress 2 | const width=125 3 | const h=5 4 | const w = new ListWidget() 5 | w.backgroundColor=new Color("#222222") 6 | w.setPadding(0, 10, 0, 10) 7 | const now = new Date() 8 | const weekday = now.getDay() == 0 ? 6 : now.getDay() - 1 9 | const minutes=now.getMinutes() 10 | 11 | getwidget(getProgress("2020-11-01T00:00:00Z")/90, "Netflix","#e50914") 12 | getwidget(getProgress("2020-08-06T00:00:00Z")/365, "YouTube","#ffffff") 13 | getwidget(getProgress("2020-07-14T00:00:00Z")/365, "Spotify","#1ed760") 14 | // getwidget(0, "AppleOne","#fb4e66") 15 | getwidget(getProgress("2020-10-16T00:00:00Z")/365, "Developer","#199ce9") 16 | 17 | getwidget(getProgress("2020-10-29T00:00:00Z")/180, "Disney+","#124292") 18 | // getwidget(getProgress("2020-10-29T00:00:00Z")/180, "Apple one","#fb4e66") 19 | 20 | function getProgress(startDateStr){ 21 | // let str = "2020-07-14T17:00:00Z" 22 | const startDate=new Date(startDateStr) 23 | const now=new Date() 24 | const diffTime = Math.abs(now - startDate); 25 | const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); 26 | 27 | console.log(startDate) 28 | console.log(now) 29 | console.log(diffDays) 30 | return diffDays 31 | } 32 | 33 | Script.setWidget(w) 34 | Script.complete() 35 | w.presentMedium() 36 | 37 | function getwidget(progress, str,color) { 38 | const titlew = w.addText(str) 39 | titlew.textColor = new Color(color) 40 | titlew.font = Font.boldSystemFont(12) 41 | w.addSpacer(1) 42 | const imgw = w.addImage(creatProgress(progress,color)) 43 | imgw.imageSize=new Size(width, h) 44 | w.addSpacer(1) 45 | } 46 | 47 | function creatProgress(progress,color){ 48 | const context =new DrawContext() 49 | context.size=new Size(width, h) 50 | context.opaque=false 51 | context.respectScreenScale=true 52 | context.setFillColor(new Color("#48484b")) 53 | const path = new Path() 54 | path.addRoundedRect(new Rect(0, 0, width, h), 3, 2) 55 | context.addPath(path) 56 | context.fillPath() 57 | context.setFillColor(new Color(color)) 58 | const path1 = new Path() 59 | path1.addRoundedRect(new Rect(0, 0, width*progress, h), 3, 2) 60 | context.addPath(path1) 61 | context.fillPath() 62 | return context.getImage() 63 | } 64 | 65 | -------------------------------------------------------------------------------- /twitter.js: -------------------------------------------------------------------------------- 1 | var twitter = "Juniorchen2012" 2 | if(args.widgetParameter){ 3 | twitter=args.widgetParameter 4 | } 5 | 6 | const w = new ListWidget() 7 | w.url="twitter://" 8 | w.backgroundColor = new Color("#1da0f2") 9 | 10 | const resp= await get({url:`https://counts.live/api/twitter-follower-count/${twitter}/live`,headers:{"Cookie": "__cfduid=d0e779c9e83b5126547bd5f43991b41da1606145300","Referer":`https://counts.live/twitter-follower-count/${twitter}`}}) 11 | try{ 12 | console.log(resp.data.lv_identifier) 13 | }catch{ 14 | resp= await get({url:`https://counts.live/api/twitter-follower-count/${twitter}/data`,headers:{"Cookie": "__cfduid=d0e779c9e83b5126547bd5f43991b41da1606145300","Referer":`https://counts.live/twitter-follower-count/${twitter}`}}) 15 | } 16 | 17 | console.log(resp.data) 18 | const stack =w.addStack() 19 | const img= await loadImage(`https://res.cloudinary.com/dzd0tndsx/image/twitter_name/${twitter}.jpg`) 20 | const imgw =stack.addImage(img) 21 | imgw.cornerRadius=35 22 | imgw.imageSize=new Size(70, 70) 23 | stack.addSpacer(30) 24 | const logo= await loadImage(`https://ftp.bmp.ovh/imgs/2020/11/dd092ebfad4ecdd4.jpeg`) 25 | const logoimgw =stack.addImage(logo) 26 | logoimgw.cornerRadius=30 27 | logoimgw.imageSize=new Size(50, 50) 28 | 29 | w.addSpacer(10) 30 | 31 | let item = addTextToListWidget(`@${resp.data.lv_identifier}`) 32 | item.font = Font.boldSystemFont(16) 33 | item.lineLimit=1 34 | let follower=addTextToListWidget(numberWithCommas(`${resp.data.followers}`)) 35 | follower.font=Font.boldSystemFont(25) 36 | // addTextToListWidget(`Follwing:${resp.data.following}`) 37 | // addTextToListWidget(`Tweets: ${resp.data.tweets}`) 38 | Script.setWidget(w) 39 | Script.complete() 40 | w.presentSmall() 41 | function addTextToListWidget(text) { 42 | let item = w.addText(text) 43 | item.textColor = Color.white() 44 | // item.textOpacity = 0.7 45 | item.font = Font.systemFont(15) 46 | // item.textSize = size 47 | return item 48 | } 49 | 50 | async function get(opts) { 51 | const request = new Request(opts.url) 52 | request.headers = { 53 | ...opts.headers, 54 | ...this.defaultHeaders 55 | } 56 | var result=await request.loadJSON() 57 | return result 58 | 59 | } 60 | 61 | function numberWithCommas(x) { 62 | return x.replace(/\B(?=(\d{3})+(?!\d))/g, ","); 63 | } 64 | 65 | async function loadImage(imgUrl) { 66 | let req = new Request(imgUrl) 67 | let image = await req.loadImage() 68 | return image 69 | } 70 | -------------------------------------------------------------------------------- /football .js: -------------------------------------------------------------------------------- 1 | var id="9" 2 | var s="39301" 3 | var local="en" 4 | // var matchdaysUrl ="https://feedmonster.onefootball.com/feeds/il/en/competitions/1/39285/matchdaysOverview.json" 5 | // zh en 6 | 7 | var title=`Team P W/D/L Goals Points` 8 | if(Device.locale() == "zh_CN"){ 9 | title=`球队 赛 胜/平/负 进/失 积分` 10 | local="zh" 11 | } 12 | if (args.widgetParameter == "laliga") { 13 | //laliga 14 | id = 10 15 | s=39319 16 | }else if (args.widgetParameter == "bl") { 17 | //bundesliga 18 | id=1 19 | s=39285 20 | } else if (args.widgetParameter == "sa") { 21 | //serie A 22 | id=13 23 | s=39325 24 | }else if (args.widgetParameter == "lue") { 25 | //ligue1 uber eats 26 | id=23 27 | s=39245 28 | } 29 | //You can find more ids and s value here:https://github.com/Juniorchen2012/scriptable/blob/master/footballLeagueData 30 | var url=`https://feedmonster.onefootball.com/feeds/il/${local}/competitions/${id}/${s}/standings.json` 31 | var iconUrl=`https://images.onefootball.com/icons/leagueColoredCompetition/64/${id}.png` 32 | 33 | // const requestM = new importModule('Env')() 34 | const json = await get({ 'url': url }) 35 | 36 | const w = new ListWidget() 37 | w.backgroundColor = new Color("#36033B") 38 | const bg = await drawBg(iconUrl) 39 | w.backgroundImage=bg 40 | // w.backgroundImage=readBgImage() 41 | const titlew= w.addText(title) 42 | titlew.textColor = new Color("#e587ce") 43 | titlew.font = Font.boldSystemFont(13) 44 | var i = 0 45 | for (var item of json.groups[0].ranking) { 46 | if (i == 6) { break } 47 | var j = 0 48 | var total = item.team.name.length 49 | const stack = w.addStack() 50 | stack.layoutHorizontally() 51 | stack.centerAlignContent() 52 | const image = await loadImage(`https://images.onefootball.com/icons/teams/56/${item.team.idInternal}.png`) 53 | const imgwidget=stack.addImage(image) 54 | imgwidget.imageSize=new Size(16, 16) 55 | const stats=item.team.teamstats 56 | createTextStack(stack, `${item.team.name}`, 100) 57 | createTextStack(stack,`${stats.played}`,30) 58 | createTextStack(stack, `${stats.won}/${stats.drawn}/${stats.lost}`, 60) 59 | createTextStack(stack, `${stats.goalsShot}/${stats.goalsGot}`, 60) 60 | createTextStack(stack, `${stats.points}`, 30) 61 | w.addSpacer(2) 62 | i++ 63 | } 64 | w.presentMedium() 65 | if (config.runsInWidget) { 66 | let widget = w 67 | Script.setWidget(widget) 68 | Script.complete() 69 | } 70 | 71 | function readBgImage() { 72 | let fm = FileManager.iCloud() 73 | let dir = fm.documentsDirectory() 74 | let filePath = fm.joinPath(dir, "PL.png") 75 | return fm.readImage(filePath) 76 | } 77 | 78 | function createTextStack(stack, text, width) { 79 | const tmpStack = stack.addStack() 80 | tmpStack.size = new Size(width, 20) 81 | const widgetText = tmpStack.addText(text) 82 | widgetText.font = Font.systemFont(13) 83 | // homeText.textColor = new Color("#e587ce") 84 | widgetText.textColor = Color.white() 85 | widgetText.textOpacity = 0.6 86 | return widgetText 87 | } 88 | 89 | async function get(opts) { 90 | const request = new Request(opts.url) 91 | request.headers = { 92 | ...opts.headers, 93 | ...this.defaultHeaders 94 | } 95 | var result=await request.loadJSON() 96 | console.log(result) 97 | return result 98 | 99 | } 100 | 101 | async function loadImage(imgUrl) { 102 | let req = new Request(imgUrl) 103 | let image = await req.loadImage() 104 | return image 105 | } 106 | 107 | async function drawBg(iconUrl){ 108 | const image = await loadImage(iconUrl) 109 | const context =new DrawContext() 110 | context.size=new Size(300, 200) 111 | context.opaque=false 112 | context.respectScreenScale=true 113 | context.setFillColor(new Color("#36033B")) 114 | context.fill(new Rect(0,0,300,200)) 115 | context.drawImageInRect(image, new Rect(255, 80, 40, 40)) 116 | return context.getImage() 117 | } 118 | -------------------------------------------------------------------------------- /footballMatch_zh.js: -------------------------------------------------------------------------------- 1 | var url = "https://gdc-soccerapi.hupu.com/soccer/match-data/v2/matches?time_zone=Asia%2FShanghai&client=5C60A99C-665D-4CEC-A118-E68E521BAE89&V=7.5.17&night=1&crt=1598326351&clientId=80798096&O=I&leagueId=epl&bddid=69854780823&sign=0616f65886053d9ce49dec521e33cb01&preload=0" 2 | if (args.widgetParameter == "csl") { 3 | url = "https://gdc-soccerapi.hupu.com/soccer/match-data/v2/matches?time_zone=Asia%2FShanghai&client=5C60A99C-665D-4CEC-A118-E68E521BAE89&V=7.5.17&night=1&crt=1598277522&clientId=80798096&O=I&leagueId=csl&bddid=69854780823&sign=2e301d59f25508c3a2ee108aea281b67&preload=0" 4 | } else if (args.widgetParameter == "laliga") { 5 | url = "https://gdc-soccerapi.hupu.com/soccer/match-data/v2/matches?time_zone=Asia%2FShanghai&client=5C60A99C-665D-4CEC-A118-E68E521BAE89&V=7.5.20&night=0&crt=1601118846&clientId=80798096&O=I&leagueId=liga&bddid=69854780823&sign=bf53920140be9ace18f7c1d4e00c9511&preload=0" 6 | } 7 | // const requestM = new importModule('Env')() 8 | const json = await get({ 'url': url }) 9 | 10 | const w = new ListWidget() 11 | const bgColor = new LinearGradient() 12 | bgColor.colors = [new Color("#1c1c1c"), new Color("#29323c")] 13 | bgColor.locations = [0.0, 1.0] 14 | // w.backgroundGradient = bgColor 15 | w.backgroundColor = new Color("#222222") 16 | 17 | for (var item of json.result.games) { 18 | var today = Boolean(item.date_block.indexOf('今日') != -1) 19 | var torm = Boolean(item.date_block.indexOf('明日') != -1) 20 | if (today || torm) { 21 | 22 | const dLine = w.addText(`${item.date_block}`) 23 | dLine.textSize = 8 24 | dLine.textColor = new Color("#e587ce") 25 | dLine.font = Font.systemFont(13) 26 | for (match of item.data) { 27 | var date = new Date(match.begin_time) 28 | var now = new Date() 29 | now.setTime(match.begin_time * 1000) 30 | console.log(match.begin_time + now) 31 | console.log(date) 32 | console.log(date.getHours()) 33 | 34 | var homeScore = '' 35 | var awayScore = '' 36 | if (match.status.desc != '未开始') { 37 | homeScore = match.home_score 38 | awayScore = match.away_score 39 | } 40 | var i = 0 41 | var total = match.home.name.length 42 | for (i = 0; i < 5 - total; i++) { 43 | console.log(match.home.name) 44 | match.home.name += " " 45 | 46 | } 47 | var homeWin = "" 48 | var awayWin = "" 49 | // if (homeScore > awayScore) { 50 | // homeWin = "🏆" 51 | // } 52 | // 53 | // if (homeScore < awayScore) { 54 | // awayWin = "🏆" 55 | // } 56 | 57 | 58 | const stack = w.addStack() 59 | stack.layoutHorizontally() 60 | stack.centerAlignContent() 61 | var homeimg = await loadImage(match.home.logo) 62 | 63 | const timeText = createTextStack(stack, `${now.getHours()}:${now.getMinutes() == 0 ? '00' : now.getMinutes()}`, 40) 64 | 65 | const imagew = stack.addImage(homeimg) 66 | imagew.imageSize=new Size(20, 20) 67 | const homeText = createTextStack(stack, ` ${match.home.name} ${homeWin}`, 100) 68 | homeText.leftAlignText() 69 | const scroeText = createTextStack(stack, `${homeScore} VS ${awayScore}`, 50) 70 | const awayText = createTextStack(stack, `${awayWin} ${match.away.name}`, 100) 71 | awayText.rightAlignText() 72 | 73 | if (today) { 74 | homeText.textOpacity = 1 75 | awayText.textOpacity = 1 76 | } 77 | 78 | if (match.status.desc != '未开始' && match.status.desc != '已结束') { 79 | homeText.textColor = Color.red() 80 | awayText.textColor = Color.red() 81 | } 82 | if (match.status.desc == '已结束') { 83 | homeText.textOpacity = 0.6 84 | awayText.textOpacity = 0.6 85 | } 86 | 87 | var img = await loadImage(match.away.logo) 88 | const imagew1 = stack.addImage(img) 89 | imagew1.imageSize=new Size(20, 20) 90 | } 91 | } 92 | 93 | } 94 | w.presentMedium() 95 | if (config.runsInWidget) { 96 | let widget = w 97 | Script.setWidget(widget) 98 | Script.complete() 99 | } 100 | 101 | function createTextStack(stack, text, width) { 102 | const tmpStack = stack.addStack() 103 | tmpStack.size = new Size(width, 20) 104 | const widgetText = tmpStack.addText(text) 105 | widgetText.font = Font.systemFont(13) 106 | // homeText.textColor = new Color("#e587ce") 107 | widgetText.textColor = Color.white() 108 | widgetText.textOpacity = 0.6 109 | return widgetText 110 | } 111 | // QuickLook.present(table) 112 | async function loadImage(imgUrl) { 113 | let req = new Request(imgUrl) 114 | let image = await req.loadImage() 115 | return image 116 | } 117 | async function get(opts) { 118 | const request = new Request(opts.url) 119 | request.headers = { 120 | ...opts.headers, 121 | ...this.defaultHeaders 122 | } 123 | var result=await request.loadJSON() 124 | console.log(result) 125 | return result 126 | 127 | } 128 | 129 | async function loadImage(imgUrl) { 130 | let req = new Request(imgUrl) 131 | let image = await req.loadImage() 132 | return image 133 | } 134 | -------------------------------------------------------------------------------- /rankingsGoals.js: -------------------------------------------------------------------------------- 1 | var id="9" 2 | var s="39301" 3 | var local="en" 4 | //You can find more ids and s value here:https://github.com/Juniorchen2012/scriptable/blob/master/footballLeagueData 5 | if(Device.locale() == "zh_CN"){ 6 | local="zh" 7 | } 8 | if (args.widgetParameter == "laliga") { 9 | //laliga 10 | id = 10 11 | s=39319 12 | }else if (args.widgetParameter == "bl") { 13 | //bundesliga 14 | id=1 15 | s=39285 16 | } else if (args.widgetParameter == "sa") { 17 | //serie A 18 | id=13 19 | s=39325 20 | }else if (args.widgetParameter == "lue") { 21 | //ligue1 uber eats 22 | id=23 23 | s=39245 24 | }else if (args.widgetParameter == "efl") { 25 | //ligue1 uber eats 26 | id=41 27 | s=39296 28 | } 29 | 30 | formatDate() 31 | 32 | var iconUrl=`https://images.onefootball.com/icons/leagueColoredCompetition/64/${id}.png` 33 | const bg = await drawBg(iconUrl) 34 | 35 | var url=`https://feedmonster.onefootball.com/feeds/il/en/competitions/${id}/${s}/league_statistics.json` 36 | const json = await get({ 'url': url }) 37 | 38 | const w = new ListWidget() 39 | const bgColor = new LinearGradient() 40 | bgColor.colors = [new Color("#1c1c1c"), new Color("#29323c")] 41 | bgColor.locations = [0.0, 1.0] 42 | // w.backgroundGradient = bgColor 43 | w.backgroundColor = new Color("#222222") 44 | w.backgroundImage=bg 45 | var matchDate="" 46 | var count=0 47 | for (var item of json.scorers) { 48 | if(count>4){ 49 | break 50 | } 51 | 52 | count++ 53 | 54 | const stack = w.addStack() 55 | // stack.backgroundColor= new Color("#25282a") 56 | w.addSpacer(2) 57 | stack.layoutHorizontally() 58 | 59 | stack.centerAlignContent() 60 | stack.setPadding(0, 0, 0, 0) 61 | const img = await loadImage(item.thumbnailSrc) 62 | // stack.addSpacer(20) 63 | // const indexImg=stack.addImage(SFSymbol.named("0.circle").image) 64 | // indexImg.imageSize=new Size(20, 20) 65 | createTextStack(stack, ` ${item.index} `, 30) 66 | const imagew = stack.addImage(img) 67 | imagew.imageSize=new Size(25, 25) 68 | 69 | const nameText = createTextStack(stack, ` ${item.name} `, 130) 70 | nameText.leftAlignText() 71 | const awayText = createTextStack(stack, `${item.seasonGoals}⚽️`, 30) 72 | // awayText.rightAlignText() 73 | stack.addSpacer(5) 74 | const teamimg = await loadImage(`https://images.onefootball.com/icons/teams/56/${item.internalTeamId}.png`) 75 | const teamimagew = stack.addImage(teamimg) 76 | teamimagew.imageSize=new Size(25, 25) 77 | // stack.addSpacer(40) 78 | w.addSpacer(3) 79 | } 80 | w.presentMedium() 81 | if (config.runsInWidget) { 82 | let widget = w 83 | Script.setWidget(widget) 84 | Script.complete() 85 | } 86 | 87 | function createTextStack(stack, text, width) { 88 | const tmpStack = stack.addStack() 89 | tmpStack.size = new Size(width, 20) 90 | const widgetText = tmpStack.addText(text) 91 | widgetText.font = Font.systemFont(13) 92 | // homeText.textColor = new Color("#e587ce") 93 | widgetText.textColor = Color.white() 94 | widgetText.textOpacity = 0.6 95 | return widgetText 96 | } 97 | 98 | // QuickLook.present(table) 99 | async function loadImage(imgUrl) { 100 | let req = new Request(imgUrl) 101 | let image = await req.loadImage() 102 | return image 103 | } 104 | 105 | async function get(opts) { 106 | const request = new Request(opts.url) 107 | request.headers = { 108 | ...opts.headers, 109 | ...this.defaultHeaders 110 | } 111 | var result=await request.loadJSON() 112 | console.log(result) 113 | return result 114 | } 115 | 116 | async function loadImage(imgUrl) { 117 | let req = new Request(imgUrl) 118 | let image = await req.loadImage() 119 | return image 120 | } 121 | 122 | function formatDate() { 123 | Date.prototype.format = function(fmt) { 124 | var o = { 125 | "M+" : this.getMonth()+1, //月份 126 | "d+" : this.getDate(), //日 127 | "h+" : this.getHours(), //小时 128 | "m+" : this.getMinutes(), //分 129 | "s+" : this.getSeconds(), //秒 130 | "q+" : Math.floor((this.getMonth()+3)/3), //季度 131 | "S" : this.getMilliseconds() //毫秒 132 | }; 133 | if(/(y+)/.test(fmt)) { 134 | fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 135 | } 136 | for(var k in o) { 137 | if(new RegExp("("+ k +")").test(fmt)){ 138 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); 139 | } 140 | } 141 | return fmt; 142 | } 143 | 144 | } 145 | 146 | async function drawBg(iconUrl){ 147 | const image = await loadImage(iconUrl) 148 | const context =new DrawContext() 149 | context.size=new Size(300, 200) 150 | context.opaque=false 151 | context.respectScreenScale=true 152 | context.setFillColor(new Color("#36033B")) 153 | context.fill(new Rect(0,0,300,200)) 154 | context.drawImageInRect(image, new Rect(255, 80, 40, 40)) 155 | return context.getImage() 156 | } 157 | -------------------------------------------------------------------------------- /matchDay.js: -------------------------------------------------------------------------------- 1 | var id="9" 2 | var s="39301" 3 | var local="en" 4 | // var matchdaysUrl ="https://feedmonster.onefootball.com/feeds/il/en/competitions/112/39198/matchdaysOverview.json" 5 | // https://api.onefootball.com/scores-mixer/v1/en/cn/matchdays/6074754 6 | //https://feedmonster.onefootball.com/feeds/il/en/competitions/112/39198/standings.json 7 | // zh en 8 | 9 | 10 | if(Device.locale() == "zh_CN"){ 11 | local="zh" 12 | } 13 | if (args.widgetParameter == "laliga") { 14 | //laliga 15 | id = 10 16 | s=39319 17 | }else if (args.widgetParameter == "bundesliga") { 18 | //bundesliga 19 | id=1 20 | s=39285 21 | } else if (args.widgetParameter == "sa") { 22 | //serie A 23 | id=13 24 | s=39325 25 | }else if (args.widgetParameter == "lue") { 26 | //ligue1 uber eats 27 | id=23 28 | s=39245 29 | } 30 | //You can find more ids and s value here:https://github.com/Juniorchen2012/scriptable/blob/master/footballLeagueData 31 | formatDate() 32 | 33 | 34 | var matchdaysurl=`https://feedmonster.onefootball.com/feeds/il/en/competitions/${id}/${s}/matchdaysOverview.json` 35 | const matchjson = await get({ 'url': matchdaysurl }) 36 | var matchdayId="" 37 | for(var matchday of matchjson.matchdays){ 38 | if(matchday.isCurrentMatchday){ 39 | matchdayId = matchday.id 40 | } 41 | } 42 | if( 43 | matchdayId.length==0 44 | ){return} 45 | var url=`https://api.onefootball.com/scores-mixer/v1/${local}/cn/matchdays/${matchdayId}` 46 | // const requestM = new importModule('Env')() 47 | const json = await get({ 'url': url }) 48 | 49 | const w = new ListWidget() 50 | const bgColor = new LinearGradient() 51 | bgColor.colors = [new Color("#1c1c1c"), new Color("#29323c")] 52 | bgColor.locations = [0.0, 1.0] 53 | // w.backgroundGradient = bgColor 54 | w.backgroundColor = new Color("#222222") 55 | var matchDate="" 56 | var count=0 57 | for (var item of json.kickoffs) { 58 | 59 | if(count>4){ 60 | break 61 | } 62 | var date = new Date(item.kickoff) 63 | 64 | let nowa = new Date() 65 | let formatter = new RelativeDateTimeFormatter() 66 | let str = formatter.string(date, nowa) 67 | console.log(str) 68 | if(str.includes( "昨天")||str.includes("yesterday")){ 69 | continue 70 | } 71 | 72 | if(date.getDate()!=matchDate){ 73 | matchDate=date.getDate() 74 | const dLine = w.addText(`${str}`) 75 | 76 | 77 | dLine.textSize = 8 78 | dLine.textColor = new Color("#e587ce") 79 | dLine.font = Font.systemFont(13) 80 | w.addSpacer(2) 81 | } 82 | for (match of item.groups[0].matches) { 83 | count++ 84 | var now = new Date(item.kickoff) 85 | // now.setTime(item.kickoff * 1000) 86 | // console.log(match.begin_time + now) 87 | // console.log(date) 88 | console.log(date.getHours()) 89 | 90 | var homeScore = '' 91 | var awayScore = '' 92 | if (match.period != 'PreMatch') { 93 | homeScore = match.score_home 94 | awayScore = match.score_away 95 | } 96 | var i = 0 97 | var total = match.team_home.name.length 98 | for (i = 0; i < 5 - total; i++) { 99 | console.log(match.team_home.name) 100 | match.team_home.name += " " 101 | 102 | } 103 | var homeWin = "" 104 | var awayWin = "" 105 | // if (homeScore > awayScore) { 106 | // homeWin = "🏆" 107 | // } 108 | // 109 | // if (homeScore < awayScore) { 110 | // awayWin = "🏆" 111 | // } 112 | 113 | 114 | const stack = w.addStack() 115 | w.addSpacer(2) 116 | stack.layoutHorizontally() 117 | stack.centerAlignContent() 118 | const homeimg = await loadImage(`https://images.onefootball.com/icons/teams/56/${match.team_home.id}.png`) 119 | 120 | // const timeText = createTextStack(stack, `${now.getHours()}:${now.getMinutes() == 0 ? '00' : now.getMinutes()}`, 40) 121 | const timeText = createTextStack(stack, `${now.format("hh:mm")}`, 40) 122 | 123 | const imagew = stack.addImage(homeimg) 124 | imagew.imageSize=new Size(20, 20) 125 | const homeText = createTextStack(stack, ` ${match.team_home.name} `, 100) 126 | homeText.leftAlignText() 127 | const scroeText = createTextStack(stack, `${homeWin} ${homeScore} VS ${awayScore} ${awayWin}`, 50) 128 | const awayText = createTextStack(stack, ` ${match.team_away.name}`, 100) 129 | awayText.rightAlignText() 130 | 131 | // if (today) { 132 | homeText.textOpacity = 1 133 | awayText.textOpacity = 1 134 | // } 135 | scroeText.textOpacity=1 136 | if (match.period != 'PreMatch' && match.period!= 'FullTime') { 137 | homeText.textColor = Color.red() 138 | awayText.textColor = Color.red() 139 | scroeText.textColor = Color.red() 140 | 141 | } 142 | if (match.period== 'FullTime') { 143 | homeText.textOpacity = 0.6 144 | awayText.textOpacity = 0.6 145 | scroeText.textOpacity=0.6 146 | } 147 | 148 | const img = await loadImage(`https://images.onefootball.com/icons/teams/56/${match.team_away.id}.png`) 149 | const imagew1 = stack.addImage(img) 150 | imagew1.imageSize=new Size(20, 20) 151 | } 152 | // } 153 | 154 | } 155 | w.presentMedium() 156 | if (config.runsInWidget) { 157 | let widget = w 158 | Script.setWidget(widget) 159 | Script.complete() 160 | } 161 | 162 | function createTextStack(stack, text, width) { 163 | const tmpStack = stack.addStack() 164 | tmpStack.size = new Size(width, 20) 165 | const widgetText = tmpStack.addText(text) 166 | widgetText.font = Font.systemFont(13) 167 | // homeText.textColor = new Color("#e587ce") 168 | widgetText.textColor = Color.white() 169 | widgetText.textOpacity = 0.6 170 | return widgetText 171 | } 172 | 173 | // QuickLook.present(table) 174 | async function loadImage(imgUrl) { 175 | let req = new Request(imgUrl) 176 | let image = await req.loadImage() 177 | return image 178 | } 179 | 180 | async function get(opts) { 181 | const request = new Request(opts.url) 182 | request.headers = { 183 | ...opts.headers, 184 | ...this.defaultHeaders 185 | } 186 | var result=await request.loadJSON() 187 | console.log(result) 188 | return result 189 | } 190 | 191 | async function loadImage(imgUrl) { 192 | let req = new Request(imgUrl) 193 | let image = await req.loadImage() 194 | return image 195 | } 196 | 197 | function formatDate() { 198 | Date.prototype.format = function(fmt) { 199 | var o = { 200 | "M+" : this.getMonth()+1, //月份 201 | "d+" : this.getDate(), //日 202 | "h+" : this.getHours(), //小时 203 | "m+" : this.getMinutes(), //分 204 | "s+" : this.getSeconds(), //秒 205 | "q+" : Math.floor((this.getMonth()+3)/3), //季度 206 | "S" : this.getMilliseconds() //毫秒 207 | }; 208 | if(/(y+)/.test(fmt)) { 209 | fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 210 | } 211 | for(var k in o) { 212 | if(new RegExp("("+ k +")").test(fmt)){ 213 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); 214 | } 215 | } 216 | return fmt; 217 | } 218 | 219 | } 220 | -------------------------------------------------------------------------------- /footballLeagueData: -------------------------------------------------------------------------------- 1 | name:Premier League id:9 s:39301 2 | name:Bundesliga id:1 s:39285 3 | name:Serie A id:13 s:39325 4 | name:LaLiga id:10 s:39319 5 | name:Ligue 1 Uber Eats id:23 s:39245 6 | name:Liga Profesional Argentina id:183 s:39363 7 | name:Primera A Clausura id:110 s:39178 8 | name:Liga NOS Portugal id:35 s:39316 9 | name:Brasileirão Série A id:16 s:39222 10 | name:Russian Premier League id:14 s:39268 11 | name:Süper Lig id:8 s:39311 12 | name:The Championship id:27 s:39305 13 | name:2. Bundesliga id:2 s:39286 14 | name:Serie B id:30 s:39336 15 | name:Segunda División id:28 s:39320 16 | name:Ligue 2 id:29 s:39246 17 | name:Primera B Nacional id:164 s:39057 18 | name:Ledman LigaPro id:142 s:39317 19 | name:Brasileirão Série B id:119 s:39223 20 | name:1. Division id:127 s:39259 21 | name:1. Lig id:121 s:39313 22 | name:CONMEBOL Libertadores id:76 s:39157 23 | name:Copa Sudamericana id:102 s:39156 24 | name:Champions League id:5 s:39356 25 | name:Europa League id:7 s:39357 26 | name:Champions League Qualifying id:21 s:39251 27 | name:Europa League Qualifying id:6 s:39290 28 | name:FA Cup id:17 s:39404 29 | name:Euro 2020 Qualifying id:22 s:38595 30 | name:DFB Pokal id:4 s:39263 31 | name:UEFA Nations League id:2349 s:39228 32 | name:FIFA World Cup id:12 s:7932 33 | name:Coppa Italia id:19 s:39335 34 | name:Copa del Rey id:18 s:39106 35 | name:Coupe de France id:33 s:39139 36 | name:Copa Argentina id:193 s:39166 37 | name:Taça de Portugal id:77 s:39099 38 | name:Türkiye Kupasi id:78 s:39369 39 | name:CONMEBOL World Cup Qualifying id:74 s:39154 40 | name:CAF World Cup Qualifying id:72 s:39055 41 | name:CONCACAF World Cup Qualifying id:71 s:39300 42 | name:AFC World Cup Qualifying id:73 s:38856 43 | name:EFL Cup id:41 s:39296 44 | name:Coupe de la Ligue id:48 s:39038 45 | name:International Friendlies id:24 s:39240 46 | name:Brasileirão Série C id:195 s:39226 47 | name:Brasileirão Série D id:216 s:39230 48 | name:Copa do Brasil id:137 s:39179 49 | name:Eredivisie id:36 s:39255 50 | name:Eerste Divisie id:101 s:39256 51 | name:J.League id:38 s:39195 52 | name:J.League 2 id:141 s:39201 53 | name:Superligaen id:57 s:39275 54 | name:Kubok id:108 s:39331 55 | name:Liga 1 id:60 s:39294 56 | name:Professional Football League id:1725 s:39276 57 | name:Scottish Premiership id:39 s:39242 58 | name:Scottish Championship id:98 s:39270 59 | name:Scottish League One id:99 s:39269 60 | name:Scottish League Two id:100 s:39271 61 | name:Scottish Cup id:40 s:39075 62 | name:Major League Soccer id:15 s:39121 63 | name:Primera División id:82 s:39181 64 | name:Primera B id:170 s:39204 65 | name:Copa Chile id:171 s:38829 66 | name:Ligue 1 Tunisia id:2687 s:39405 67 | name:Super League id:25 s:39324 68 | name:Pernambucano id:202 s:39149 69 | name:Honduran Liga Nacional id:2724 s:39342 70 | name:Cupa Romaniei id:107 s:39084 71 | name:Algarve Cup id:2745 s:39221 72 | name:Africa Cup Of Nations Qualifiers id:2695 s:39111 73 | name:A-League id:84 s:39061 74 | name:Torneo Apertura id:177 s:39188 75 | name:Sergipano id:1916 s:39119 76 | name:UEFA Women's Champions League id:2702 s:39366 77 | name:Regionalliga Südwest id:51 s:39274 78 | name:Indian Super League id:154 s:39515 79 | name:Brasiliense id:1883 s:39141 80 | name:FIFA U20 World Cup id:185 s:38820 81 | name:Campeonato Paulista id:161 s:39125 82 | name:Cearense 1 id:1889 s:39145 83 | name:Copa Paulista id:212 s:39368 84 | name:Supercup id:128 s:39264 85 | name:Liga Premier id:219 s:39337 86 | name:Egyptian Premier League id:2732 s:39100 87 | name:Kupa e Shqipërisë id:136 s:39448 88 | name:Division 1A id:58 s:39244 89 | name:Persian Gulf Pro League id:2690 s:39361 90 | name:FA Community Shield id:65 s:39277 91 | name:Trofeo Joan Gamper id:2715 s:39340 92 | name:Division 1 Féminine id:2703 s:39254 93 | name:K-League Promotion Playoff id:2735 s:39132 94 | name:LigaPro Banco Pichincha id:172 s:39162 95 | name:Paraense id:1906 s:39159 96 | name:Copa Fares Lopes id:1891 s:38901 97 | name:League One id:42 s:39304 98 | name:Meistriliiga id:2747 s:39229 99 | name:Süper Kupa id:151 s:38886 100 | name:AFC Champions League id:155 s:39155 101 | name:Primera A Apertura id:109 s:39177 102 | name:CONCACAF Champions League id:190 s:39138 103 | name:Premier Soccer League id:118 s:39360 104 | name:Paulista Série A3 id:201 s:39129 105 | name:Slovak Super Liga id:2723 s:39260 106 | name:Puchar Polski id:106 s:39266 107 | name:DFB-Pokal Frauen id:2743 s:39309 108 | name:Roraimense id:1915 s:39217 109 | name:São Paulo Youth Cup id:1918 s:39137 110 | name:Regionalliga Nordost id:50 s:39262 111 | name:Segunda B id:150 s:39343 112 | name:Brasileiro Women id:1882 s:39144 113 | name:AFC Asian Cup id:156 s:37214 114 | name:Ekstraklasa id:59 s:39267 115 | name:Copa do Nordeste id:160 s:39114 116 | name:Catarinense 2 id:1888 s:39353 117 | name:CAF Champions League id:210 s:39046 118 | name:Ligat HaAl id:2731 s:39253 119 | name:Superpuchar Polski id:133 s:39250 120 | name:FIFA Women's World Cup id:34 s:38597 121 | name:CONMEBOL Pre-Olympic Tournament id:2739 s:39187 122 | name:National League id:97 s:39334 123 | name:Superettan id:181 s:39165 124 | name:Vysheyshaya Liga id:2688 s:39235 125 | name:Supercoppa Italiana id:64 s:39113 126 | name:MLS All-Star Game id:2714 s:38940 127 | name:CONCACAF Nations League id:2730 s:39097 128 | name:Eliteserien id:67 s:39164 129 | name:Primera B Metropolitana id:165 s:39042 130 | name:Mineiro 2 id:1905 s:39147 131 | name:UEFA Women's Euro Qualifying id:480 s:39093 132 | name:Kategoria e Parë id:135 s:39452 133 | name:Championnat National 3 id:1723 s:39258 134 | name:Virsliga id:2746 s:39227 135 | name:Supercup id:149 s:39288 136 | name:Club Friendly Games id:140 s:39117 137 | name:Campeonato Uruguayo Primera Apertura id:103 s:39213 138 | name:Campeonato Uruguayo Primera Torneo Intermedio id:192 s:39362 139 | name:Damallsvenskan id:2701 s:39168 140 | name:DBU Pokalen id:182 s:39322 141 | name:2. Liga id:116 s:39306 142 | name:Paulista Série A2 id:200 s:39131 143 | name:Serie A Women id:2721 s:39281 144 | name:KNVB Beker id:105 s:39358 145 | name:Copa de la Reina id:2742 s:39206 146 | name:Campeonato Uruguayo Primera Clausura id:81 s:39214 147 | name:Rondoniense id:1914 s:39171 148 | name:Copa América id:37 s:39349 149 | name:Copa do Brasil U20 id:1898 s:39207 150 | name:Frauenbundesliga id:47 s:39265 151 | name:Liga 1 id:148 s:39218 152 | name:Amazonense id:1880 s:39152 153 | name:NWSL Fall Series id:2753 s:39341 154 | name:Fortuna liga id:159 s:39284 155 | name:Catarinense 1 id:1887 s:39150 156 | name:Telekom Cup id:370 s:38694 157 | name:Recopa Sudamericana id:205 s:39199 158 | name:Super Liga id:123 s:39247 159 | name:Paraibano id:214 s:39120 160 | name:1. SNL id:2728 s:39261 161 | name:FA Cup id:129 s:39328 162 | name:Friendlies Women id:2734 s:39173 163 | name:Audi Cup id:93 s:38855 164 | name:Primera División Clausura id:180 s:39351 165 | name:DFL Supercup id:55 s:39289 166 | name:J League World Challenge id:2713 s:38965 167 | name:CONCACAF League id:2729 s:39347 168 | name:Supercopa de España id:63 s:39115 169 | name:Matogrossense id:1903 s:39128 170 | name:UEFA EURO 2020™ id:20 s:39298 171 | name:Trofeo Campeon de Campeones id:385 s:38875 172 | name:Kategoria Superiore id:134 s:39314 173 | name:Championnat National 2 id:1722 s:39257 174 | name:SheBelieves Cup id:2744 s:39215 175 | name:EFL Trophy id:143 s:39299 176 | name:Greek Cup id:126 s:39107 177 | name:Premier Division id:191 s:39163 178 | name:NWSL id:2700 s:39219 179 | name:Chinese Super League id:112 s:39198 180 | name:Paranaense id:199 s:39136 181 | name:Liga de Fútbol de Primera División id:2716 s:39273 182 | name:Supercopa do Brasil id:2738 s:39183 183 | name:Liga MX Clausura id:80 s:39160 184 | name:Peru Liga 1 id:176 s:39189 185 | name:Potiguar id:1913 s:39169 186 | name:Copa Verde id:1895 s:38914 187 | name:Regionalliga West id:46 s:39292 188 | name:Liga Super Malaysia id:147 s:39210 189 | name:Amapaense id:1879 s:39174 190 | name:USL Championship id:2750 s:39233 191 | name:Copa MX id:204 s:38985 192 | name:Goiano id:197 s:39142 193 | name:Challenge League id:207 s:39326 194 | name:Primera Division de El Salvador id:2726 s:39348 195 | name:Beker van België id:117 s:39280 196 | name:Superliga Colombiana id:2752 s:39332 197 | name:Scottish League Cup id:2712 s:39295 198 | name:International Champions Cup id:90 s:38832 199 | name:Primera División Apertura id:179 s:39197 200 | name:Tocantinense id:1919 s:39170 201 | name:Africa Cup of Nations id:49 s:39359 202 | name:Emirates Cup id:2707 s:38935 203 | name:Superleague id:56 s:39329 204 | name:Qatar Stars League id:158 s:39318 205 | name:Carioca 2 id:1886 s:39239 206 | name:UEFA Super Cup id:68 s:39308 207 | name:FFA Cup id:2722 s:39089 208 | name:Allsvenskan id:62 s:39176 209 | name:Campeonato Gaúcho id:163 s:39161 210 | name:Maranhense id:1902 s:39158 211 | name:Supercopa MX id:383 s:38874 212 | name:I Liga id:132 s:39283 213 | name:Championnat National id:1721 s:39252 214 | name:Serie D id:2741 s:39346 215 | name:Super Kupa id:138 s:39307 216 | name:UEFA European Under-21 Championship id:86 s:39333 217 | name:3. Liga id:3 s:39302 218 | name:I-League id:187 s:39116 219 | name:Campeonato de Portugal id:2698 s:39330 220 | name:Saudi Professional League id:111 s:39355 221 | name:Mineiro id:198 s:39146 222 | name:Canadian Premier League id:2705 s:39220 223 | name:CONCACAF Gold Cup id:87 s:38841 224 | name:Florida Cup id:2737 s:39172 225 | name:FIFA Club World Cup id:75 s:39085 226 | name:Primera División Clausura id:175 s:39327 227 | name:Piauiense id:1912 s:39153 228 | name:Swiss Cup id:32 s:39321 229 | name:Copa Santa Catarina id:1894 s:38571 230 | name:Regionalliga Nord id:44 s:39310 231 | name:Serie C id:144 s:39345 232 | name:Alagoano id:1878 s:39122 233 | name:OTP Bank Liga id:2749 s:39249 234 | name:Copa Colombia id:168 s:39205 235 | name:Liga de Ascenso id:203 s:39291 236 | name:Argentina Super Cup id:194 s:39148 237 | name:Bundesliga id:26 s:39297 238 | name:1. HNL id:120 s:39272 239 | name:Primera B id:206 s:39180 240 | name:Liga Nacional de Guatemala id:2725 s:39241 241 | name:2020 NWSL Challenge Cup id:2751 s:39243 242 | name:Taça Da Liga id:2697 s:38929 243 | name:Torneo Guardianes id:89 s:39248 244 | name:Torneo Clausura id:178 s:38893 245 | name:Sul-Matogrossense id:1917 s:39130 246 | name:Premier League Asia Trophy id:2706 s:38933 247 | name:Regionalliga Bayern id:52 s:38884 248 | name:UAE Arabian Gulf League id:157 s:39279 249 | name:Capixaba id:1885 s:39127 250 | name:UEFA Youth League id:189 s:39080 251 | name:Leagues Cup id:2717 s:39008 252 | name:Premjer-Liha id:61 s:39293 253 | name:Campeonato Carioca id:162 s:39126 254 | name:Gaúcho 2 id:1899 s:39190 255 | name:Copa Rio id:213 s:38863 256 | name:K League 1 id:130 s:39182 257 | name:Veikkausliiga id:680 s:39186 258 | name:Liga MX Femenil id:2733 s:39282 259 | name:Botola id:186 s:39083 260 | name:FA Women's Super League id:2696 s:39287 261 | name:Trophée des Champions id:66 s:38861 262 | name:Baiano id:196 s:39118 263 | name:Primera Division Women id:2704 s:39344 264 | name:K-League 2 id:2736 s:39203 265 | name:Primera División Apertura id:174 s:39151 266 | name:Pernambucano 2 id:1911 s:39354 267 | name:ÖFB-Cup id:31 s:39278 268 | name:Copa Gaúcha id:1892 s:39050 269 | name:League Two id:43 s:39303 270 | name:Acreano id:1877 s:39140 271 | name:A Lyga id:2748 s:39231 272 | name:US Open Cup id:153 s:39200 273 | --------------------------------------------------------------------------------