|
|
@@ -1295,10 +1295,14 @@ async fn http_get_steam(
|
|
|
HeaderValue::from_static("\"Windows\""),
|
|
|
);
|
|
|
// 伪造的基础 Cookie(用于通过 Steam 的基础校验)
|
|
|
- headers.insert(
|
|
|
- "Cookie",
|
|
|
- HeaderValue::from_static("timezoneOffset=28800,0; steamCountry=CN%7Cxxxxxxxxxxxx"),
|
|
|
- );
|
|
|
+ // 注意:Steam market `render` 接口额外携带 bMarketOptOut=1
|
|
|
+ let base_cookie = "timezoneOffset=28800,0; steamCountry=CN%7Cxxxxxxxxxxxx";
|
|
|
+ let cookie = if url.contains("/market/listings/") && url.contains("/render") {
|
|
|
+ format!("{base_cookie}; bMarketOptOut=1")
|
|
|
+ } else {
|
|
|
+ base_cookie.to_string()
|
|
|
+ };
|
|
|
+ headers.insert("Cookie", HeaderValue::from_str(&cookie).map_err(|e| e.to_string())?);
|
|
|
|
|
|
let request_start = std::time::Instant::now();
|
|
|
|