×
固定報酬制
|
5,000円 〜 10,000円
|
---|---|
納品完了日
|
- |
掲載日
|
2021年04月22日 |
応募期限
|
2021年05月06日 |
必要なスキル
|
応募した人 | 3 人 |
---|---|
契約した人 | 1 人 |
募集人数 | 1 人 |
気になる!リスト | 3 人 |
.swift 【概要】 Swift製の指定のURLから情報を取り出すclassをこちらで作成しました。 そのクラスに一部のURLを引数として渡した場合、結果が文字化けして返却される不具合があります。 この部分をデグレードを発生させずに修正していただきたいです。 【不具合を起こすURLの例】 ・https://www.marunouchi.com/building/shinmaru/ ・https://travel.rakuten.co.jp/hokkaido/ 上記URLはLINEのトークなどへ入力すると正しく情報が取得されるURLですが、 当方保持のclassでは文字化けしてしまいます。 【既存の仕様】 既存機能の大まかな仕様: https://crowdworks.jp/public/jobs/6127254?ref=mypage_jobs#confirm 【既存クラス】 表示はインターフェースと返却される型のみ。実際は100行程度のクラスです。 ご希望でしたら相談の段階で全てのソースコードをお渡しします。 ```WebPageAbstractInfoRetrieve.swift import Alamofire import Kanna class WebPageAbstractInfoRetrieve { static func get(from url: String, completion: @escaping (Result<WebPageAbstractInfo, Error>) -> Void) { AF.request(url).responseString { response in switch response.result { case .success(let htmlString): completion(.success(parseHtml(htmlString: htmlString, sourceUrl: url))) case .failure(let error): switch error { default: completion(.failure(RetrieveError.requestError)) } } } } } ``` ```WebPageAbstractInfo.swift struct WebPageAbstractInfo: Equatable { let url: String let title: String? let description: String? let siteName: String? let imageUrl: String? } ``` |
特記事項 |
---|
|
クラウドワーカー | 応募日時 |
---|---|
mafumafu19 | 2021/04/23 17:01 |
明け17 | 2021/04/22 13:39 |
daisuke8929 | 2021/04/22 12:26 |