mirror of
				https://github.com/suyiiyii/nonebot-bison.git
				synced 2025-11-04 05:24:53 +08:00 
			
		
		
		
	🔧 更新默认UA为Windows平台
This commit is contained in:
		
							parent
							
								
									40f9bc817f
								
							
						
					
					
						commit
						6e28ad3502
					
				@ -22,7 +22,7 @@ BISON_SKIP_BROWSER_CHECK=false
 | 
				
			|||||||
BISON_USE_PIC_MERGE=0
 | 
					BISON_USE_PIC_MERGE=0
 | 
				
			||||||
BISON_RESEND_TIMES=0
 | 
					BISON_RESEND_TIMES=0
 | 
				
			||||||
BISON_PROXY=
 | 
					BISON_PROXY=
 | 
				
			||||||
BISON_UA=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
 | 
					BISON_UA=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0
 | 
				
			||||||
BISON_SHOW_NETWORK_WARNING=true
 | 
					BISON_SHOW_NETWORK_WARNING=true
 | 
				
			||||||
BISON_PLATFORM_THEME='{}'
 | 
					BISON_PLATFORM_THEME='{}'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -36,7 +36,8 @@ class PlugConfig(BaseModel):
 | 
				
			|||||||
    bison_resend_times: int = 0
 | 
					    bison_resend_times: int = 0
 | 
				
			||||||
    bison_proxy: str | None = None
 | 
					    bison_proxy: str | None = None
 | 
				
			||||||
    bison_ua: str = Field(
 | 
					    bison_ua: str = Field(
 | 
				
			||||||
        "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
 | 
					        "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)"
 | 
				
			||||||
 | 
					        " Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0",
 | 
				
			||||||
        description="默认UA",
 | 
					        description="默认UA",
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    bison_show_network_warning: bool = True
 | 
					    bison_show_network_warning: bool = True
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,8 @@ async def test_http_error(app: App):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    assert ctx.gen_req_records() == [
 | 
					    assert ctx.gen_req_records() == [
 | 
				
			||||||
        "https://example.com Headers({'host': 'example.com', 'accept': '*/*', 'accept-encoding': 'gzip, deflate',"
 | 
					        "https://example.com Headers({'host': 'example.com', 'accept': '*/*', 'accept-encoding': 'gzip, deflate',"
 | 
				
			||||||
        " 'connection': 'keep-alive', 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like"
 | 
					        " 'connection': 'keep-alive', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
 | 
				
			||||||
        " Gecko) Chrome/51.0.2704.103 Safari/537.36'}) | [403] Headers({'content-length': '15', 'content-type':"
 | 
					        " (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0'}) | [403] Headers({'content-length': '"
 | 
				
			||||||
 | 
					        "15', 'content-type':"
 | 
				
			||||||
        ' \'application/json\'}) {"error": "gg"}'
 | 
					        ' \'application/json\'}) {"error": "gg"}'
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user