howlongtobeat 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/howlongtobeat/html_requests.rb +13 -1
- data/lib/howlongtobeat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30968d273638c5687a8f004d3af466ba21fe5c1ffb9a901b8d46bb7e0bfe9c57
|
|
4
|
+
data.tar.gz: 70cfdf898cc6adc10f3916822e4dc9b6f64db824fb45be348dd2185825c0d292
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26add34fc6bc60313c3c85cd37de8f3f3e3fb116b1fd841104311080d7d2ccdbab4afbd528b85cbfc17a4707830741ba532a7d735c3708258eb710c670b35a21
|
|
7
|
+
data.tar.gz: d29ee7ade48aa6984af6eaecdad80242d464aa9d5c1ce659e1508ad3810cccbf9608db188ea16f1c721c8ed8093f884037b93ab6ef2b105912bc15109cfc3dcb
|
data/CHANGELOG.md
CHANGED
|
@@ -25,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
25
25
|
### Security
|
|
26
26
|
- None
|
|
27
27
|
|
|
28
|
+
## [0.2.1] - 2025-12-13
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
- Added SSL certificate verification fallback for environments with certificate issues
|
|
32
|
+
- Added `origin` and `accept` headers to token fetch requests for proper API authentication
|
|
33
|
+
|
|
28
34
|
## [0.2.0] - 2025-12-13
|
|
29
35
|
|
|
30
36
|
### Changed
|
|
@@ -179,7 +179,9 @@ module HowLongToBeat
|
|
|
179
179
|
def get_title_request_headers
|
|
180
180
|
{
|
|
181
181
|
'User-Agent' => random_user_agent,
|
|
182
|
-
'referer' => REFERER_HEADER
|
|
182
|
+
'referer' => REFERER_HEADER,
|
|
183
|
+
'origin' => BASE_URL,
|
|
184
|
+
'accept' => '*/*'
|
|
183
185
|
}
|
|
184
186
|
end
|
|
185
187
|
|
|
@@ -193,6 +195,11 @@ module HowLongToBeat
|
|
|
193
195
|
|
|
194
196
|
response = http.request(request)
|
|
195
197
|
response.body if response.is_a?(Net::HTTPSuccess)
|
|
198
|
+
rescue OpenSSL::SSL::SSLError => e
|
|
199
|
+
# SSL certificate verification failed - disable verification as fallback
|
|
200
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
201
|
+
response = http.request(request)
|
|
202
|
+
response.is_a?(Net::HTTPSuccess) ? response.body : nil
|
|
196
203
|
rescue StandardError => e
|
|
197
204
|
nil
|
|
198
205
|
end
|
|
@@ -210,6 +217,11 @@ module HowLongToBeat
|
|
|
210
217
|
else
|
|
211
218
|
nil
|
|
212
219
|
end
|
|
220
|
+
rescue OpenSSL::SSL::SSLError => e
|
|
221
|
+
# SSL certificate verification failed - disable verification as fallback
|
|
222
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
223
|
+
response = http.request(request)
|
|
224
|
+
response.is_a?(Net::HTTPSuccess) ? response.body : nil
|
|
213
225
|
rescue StandardError => e
|
|
214
226
|
nil
|
|
215
227
|
end
|