Nicoseiga: rewrite tests and fix several bugs

* Fixed a bug where manga posts with a single tag would raise an error
* Fixed a bug where dic.nicovideo.jp/oekaki posts weren't uploadable due
  to SSL issues
* Added support for more manga corner cases
This commit is contained in:
nonamethanks
2022-09-29 00:46:47 +02:00
committed by N. Oname
parent d629c81aa1
commit d51cc17eaf
6 changed files with 212 additions and 179 deletions

View File

@@ -95,6 +95,14 @@ module Source
parsed_url.manga_id || parsed_referer&.manga_id
end
def http
if parsed_url.oekaki_id.present?
super.with_legacy_ssl
else
super
end
end
def api_client
if illust_id.present?
NicoSeigaApiClient.new(work_id: illust_id, type: "illust", http: http)