Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
327 views
in Technique[技术] by (71.8m points)

Python Pexels API Per_page

according to Pexels API, you can set up a "per_page" integer | optional - The number of results you are requesting per page. Default: 15 Max: 80

So, I do:

video_base_url = 'https://api.pexels.com/videos/search'
my_obj_video = {'query':'fitness','width':1080,'height':1920,'per_page':80}
requesting_video = requests.get(video_base_url,headers = {'Authorization':api_key}, data = my_obj_video)

But when I download these videos, via f.write(requests.get), I only get 15 results, even though I set up per page being 80. Is there anything wrong here?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...