{"action":"closed","issue":{"url":"https://api.github.com/repos/XIAZY/DriveIt/issues/17","repository_url":"https://api.github.com/repos/XIAZY/DriveIt","labels_url":"https://api.github.com/repos/XIAZY/DriveIt/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/XIAZY/DriveIt/issues/17/comments","events_url":"https://api.github.com/repos/XIAZY/DriveIt/issues/17/events","html_url":"https://github.com/XIAZY/DriveIt/issues/17","id":174075387,"number":17,"title":"dm5应该是又改版了........","user":{"login":"Trim21","id":13553903,"avatar_url":"https://avatars.githubusercontent.com/u/13553903?v=3","gravatar_id":"","url":"https://api.github.com/users/Trim21","html_url":"https://github.com/Trim21","followers_url":"https://api.github.com/users/Trim21/followers","following_url":"https://api.github.com/users/Trim21/following{/other_user}","gists_url":"https://api.github.com/users/Trim21/gists{/gist_id}","starred_url":"https://api.github.com/users/Trim21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trim21/subscriptions","organizations_url":"https://api.github.com/users/Trim21/orgs","repos_url":"https://api.github.com/users/Trim21/repos","events_url":"https://api.github.com/users/Trim21/events{/privacy}","received_events_url":"https://api.github.com/users/Trim21/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-30T17:16:25Z","updated_at":"2016-08-31T03:31:13Z","closed_at":"2016-08-31T03:31:13Z","body":"\r\n![image](https://cloud.githubusercontent.com/assets/13553903/18098859/a0ecf97e-6f16-11e6-8907-cc619db1761a.png)\r\n\r\n原因:原来应该是dm5没有移动端网页适配,现在有了,各种元素都重命名了\r\n\r\n修复方法:\r\ndm5不伪造UA,使用笔记本UA即可\r\n\r\n```\r\nclass DM5(SharedBase):\r\n    def get_data(self, url, referrer=''):\r\n        self.webheader = {\r\n            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36',\r\n            'Referer': referrer}\r\n        req = request.Request(url=url, headers=self.webheader)\r\n        web_page = request.urlopen(req)\r\n        page_data = web_page.read()\r\n        return page_data\r\n\r\n    def __init__(self, url):\r\n```\r\n\r\n重写了get_data方法,但是在文件头要`from urllib import request`,有没有什么优雅一点的办法..."}}
{"actor":{"display_login":"XIAZY"}}