所谓觉悟,|

月海与游梦人

园龄:1年11个月粉丝:0关注:0

chap17使用API

使用web API

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import requests
 
url = 'https://api.github.com/search/repositories?q=language:python&sort=stars'
headers = {'Accept':'application/vnd.github.v3+json'}
r=requests.get(url,headers=headers)
print(f'Status code:{r.status_code}')
response_dict = r.json()
print(response_dict.keys())
repo_dicts = response_dict['items']
print(f'\nSelected information about each respository:')
for repo_dict in repo_dicts:
    print(f"\nName:{repo_dict['name']}")
    print(f"Owner:{repo_dict['owner']['login']}")
    print(f"Stars:{repo_dict['stargazers_count']}")
    print(f"Repository:{repo_dict['html_url']}")
    print(f"Description:{repo_dict['description']}")

api是什么:

api是2个主体间的接口,类似与古代的信使,让双方交换信息

#意外发现

https://github.com/jackfrued/Python-100-Days  非常好的教程   

 

本文作者:月海与游梦人

本文链接:https://www.cnblogs.com/hbdxlzy/p/17285825.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   月海与游梦人  阅读(15)  评论(1编辑  收藏  举报
   
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 Old Town Road REOL
Old Town Road - REOL
00:00 / 00:00
An audio error has occurred.

作词 : Montero Lamar Hill/Kiowa Roukema

作曲 : Montero Lamar Hill/Kiowa Roukema

Yeah, I'm gonna take my horse to the old town road

I'm gonna ride 'til I can't no more

I'm gonna take my horse to the old town road

I'm gonna ride 'til I can't no more (Kio, Kio)

I got the horses in the back

Horse tack is attached

Hat is matte black

Got the boots that's black to match

Ridin' on a horse, ha

You can whip your Porsche

I been in the valley

You ain't been up off that porch, now

Can't nobody tell me nothin'

You can't tell me nothin'

Can't nobody tell me nothin'

You can't tell me nothin'

Ridin' on a tractor

Lean all in my bladder

Cheated on my baby

You can go and ask her

My life is a movie

Bull ridin' and boobies

Cowboy hat from Gucci

Wrangler on my booty

Can't nobody tell me nothin'

You can't tell me nothin'

Can't nobody tell me nothin'

You can't tell me nothin'

Yeah, I'm gonna take my horse to the old town road

I'm gonna ride 'til I can't no more

I'm gonna take my horse to the old town road

I'm gonna ride 'til I can't no more

I got the—I got the—I got the—I got the—