{"action":"opened","issue":{"url":"https://api.github.com/repos/bandiaozimu/dj_voice_organize/issues/4","repository_url":"https://api.github.com/repos/bandiaozimu/dj_voice_organize","labels_url":"https://api.github.com/repos/bandiaozimu/dj_voice_organize/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/bandiaozimu/dj_voice_organize/issues/4/comments","events_url":"https://api.github.com/repos/bandiaozimu/dj_voice_organize/issues/4/events","html_url":"https://github.com/bandiaozimu/dj_voice_organize/issues/4","id":353999072,"node_id":"MDU6SXNzdWUzNTM5OTkwNzI=","number":4,"title":"整理资料库时出现Wide character导致失败的问题","user":{"login":"Sgearjhz","id":30036862,"node_id":"MDQ6VXNlcjMwMDM2ODYy","avatar_url":"https://avatars0.githubusercontent.com/u/30036862?v=4","gravatar_id":"","url":"https://api.github.com/users/Sgearjhz","html_url":"https://github.com/Sgearjhz","followers_url":"https://api.github.com/users/Sgearjhz/followers","following_url":"https://api.github.com/users/Sgearjhz/following{/other_user}","gists_url":"https://api.github.com/users/Sgearjhz/gists{/gist_id}","starred_url":"https://api.github.com/users/Sgearjhz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sgearjhz/subscriptions","organizations_url":"https://api.github.com/users/Sgearjhz/orgs","repos_url":"https://api.github.com/users/Sgearjhz/repos","events_url":"https://api.github.com/users/Sgearjhz/events{/privacy}","received_events_url":"https://api.github.com/users/Sgearjhz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-25T09:32:57Z","updated_at":"2018-08-25T09:32:57Z","closed_at":null,"author_association":"NONE","body":"在将某些资源导入资料库时，终端如下所示报错：\r\n`----- move to /Users/XXXXX/voice1808251341`\r\n`----- unfoldDLSiteFile`\r\n`----- grapDLCount`\r\n`Wide character at /Library/Perl/5.18/darwin-thread-multi-2level/Encode.pm line 296.`\r\n`----- buildDLSite`\r\n\r\n看了下err.log中显示：\r\n`malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before \"(end of string)\") at ./buildDLSite line 41.`\r\n发现是new_works.json中没有任何信息输出。\r\n\r\n于是定位到grapDLCount文件，尝试注释掉第71行\r\n> result{'text'}   = Encode::decode_utf8( $result{'text'});\r\n后能够工作，故发现是因为从dlsite爬到的work_text信息没有被成功解码。\r\n\r\n通过分析这些失败资源的异同，发现原因出于work_text中的`…`字符，也即HTML中的省略符`&hellip;`。\r\n可以通过在前面增加：\r\n$result{'text'} =~ s/…/.../;\r\n将`…`替换为三个`.`解决。\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"Sgearjhz"}}