12345678910111213141516171819 |
- # -*- coding: utf-8 -*-
- # @Author : ChenZhaoyuchen
- # @Time : 2024/9/13 15:03
- # @File : GetResponse.py
- import requests
- headers_bili = {
- 'accept': 'text / html, application / xhtml + xml, application / xml;q = 0.9, image / avif, image / webp, image / apng, * / *;q = 0.8, application / signed - exchange;v = b3;q = 0.7',
- 'accept - encoding': 'gzip, deflate',
- 'accept - language': 'zh - CN, zh;q = 0.9, en;q = 0.8, en - GB;q = 0.7, en - US;q = 0.6',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0',
- 'Referer': 'https://www.bilibili.com/?spm_id_from=333.337.0.0'
- }
- def GetResponse(url):
- headers = headers_bili
- response = requests.get(url = url,headers = headers)
- return response
|