Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 创建自动github问题_Ruby_Github_Https - Fatal编程技术网

Ruby 创建自动github问题

Ruby 创建自动github问题,ruby,github,https,Ruby,Github,Https,我一直在尝试自动化我的github问题,但是我遇到了一个问题,脚本不会创建问题,它会提取api和所有数据,并按照它应该的方式工作,但不会创建问题。我做错了什么,这将无法按预期工作,这意味着我如何能够自动创建问题本身 require 'net/http' require 'uri' require 'openssl' require 'json' ID = "ID" SECRET = "SECRET" def create_git_issue(user, pass, repo_name, re

我一直在尝试自动化我的github问题,但是我遇到了一个问题,脚本不会创建问题,它会提取api和所有数据,并按照它应该的方式工作,但不会创建问题。我做错了什么,这将无法按预期工作,这意味着我如何能够自动创建问题本身

require 'net/http'
require 'uri'
require 'openssl'
require 'json'

ID = "ID"
SECRET = "SECRET"

def create_git_issue(user, pass, repo_name, repo_owner,
                     title, body, assignee, milestone, 
                     labels)
    url = URI("https://api.github.com/repos/#{repo_owner}/#{repo_name}/issues?client_id=#{ID}&client_secret=#{SECRET}")
    Net::HTTP.start(url.host, url.port,
        :use_ssl => url.scheme == "https",
        :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|

        request = Net::HTTP::Post.new url.request_uri
        request.basic_auth user, pass

        response = http.request request
        puts response
        #puts response.body
        issue = {
        :title => title,
        :body => body,
        :assignee => assignee,
        :milestone => milestone,
        :labels => labels
        }
        data = JSON.generate(issue)
        request.body = data
        request["Header"] = "application/vnd.github.v3+json"
    end
end

create_git_issue("user", "secret", "repo", "owner",
                 "Test issue #1", "test", "", nil, nil)
答复:

#<Net::HTTPOK:0x2e2d7b8>
[{"url":"https://api.github.com/repos/WhitewidowScanner/whitewidow/issues/30","r
epository_url":"https://api.github.com/repos/WhitewidowScanner/whitewidow","labe
ls_url":"https://api.github.com/repos/WhitewidowScanner/whitewidow/issues/30/lab
els{/name}","comments_url":"https://api.github.com/repos/WhitewidowScanner/white
widow/issues/30/comments","events_url":"https://api.github.com/repos/WhitewidowS
canner/whitewidow/issues/30/events","html_url":"https://github.com/WhitewidowSca
nner/whitewidow/issues/30","id":192271670,"number":30,"title":"Encoding errors w
ith recursive spider","user":{"login":"Shazgul","id":20743799,"avatar_url":"http
s://avatars.githubusercontent.com/u/20743799?v=3","gravatar_id":"","url":"https:
//api.github.com/users/Shazgul","html_url":"https://github.com/Shazgul","followe
rs_url":"https://api.github.com/users/Shazgul/followers","following_url":"https:
//api.github.com/users/Shazgul/following{/other_user}","gists_url":"https://api.
github.com/users/Shazgul/gists{/gist_id}","starred_url":"https://api.github.com/
users/Shazgul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.co
m/users/Shazgul/subscriptions","organizations_url":"https://api.github.com/users
/Shazgul/orgs","repos_url":"https://api.github.com/users/Shazgul/repos","events_
url":"https://api.github.com/users/Shazgul/events{/privacy}","received_events_ur
l":"https://api.github.com/users/Shazgul/received_events","type":"User","site_ad
min":false},"labels":[{"id":490987868,"url":"https://api.github.com/repos/Whitew
idowScanner/whitewidow/labels/ENCODING","name":"ENCODING","color":"b60205","defa
ult":false},{"id":458176860,"url":"https://api.github.com/repos/WhitewidowScanne
r/whitewidow/labels/temp%20fix","name":"temp fix","color":"c2e0c6","default":fal
se},{"id":480395818,"url":"https://api.github.com/repos/WhitewidowScanner/whitew
idow/labels/testing","name":"testing","color":"d4c5f9","default":false}],"state"
:"open","locked":false,"assignee":{"login":"Ekultek","id":14183473,"avatar_url":
"https://avatars.githubusercontent.com/u/14183473?v=3","gravatar_id":"","url":"h
ttps://api.github.com/users/Ekultek","html_url":"https://github.com/Ekultek","fo
llowers_url":"https://api.github.com/users/Ekultek/followers","following_url":"h
ttps://api.github.com/users/Ekultek/following{/other_user}","gists_url":"https:/
/api.github.com/users/Ekultek/gists{/gist_id}","starred_url":"https://api.github
.com/users/Ekultek/starred{/owner}{/repo}","subscriptions_url":"https://api.gith
ub.com/users/Ekultek/subscriptions","organizations_url":"https://api.github.com/
users/Ekultek/orgs","repos_url":"https://api.github.com/users/Ekultek/repos","ev
ents_url":"https://api.github.com/users/Ekultek/events{/privacy}","received_even
ts_url":"https://api.github.com/users/Ekultek/received_events","type":"User","si
te_admin":false},"assignees":[{"login":"Ekultek","id":14183473,"avatar_url":"htt
ps://avatars.githubusercontent.com/u/14183473?v=3","gravatar_id":"","url":"https
://api.github.com/users/Ekultek","html_url":"https://github.com/Ekultek","follow
ers_url":"https://api.github.com/users/Ekultek/followers","following_url":"https
://api.github.com/users/Ekultek/following{/other_user}","gists_url":"https://api
.github.com/users/Ekultek/gists{/gist_id}","starred_url":"https://api.github.com
/users/Ekultek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.c
om/users/Ekultek/subscriptions","organizations_url":"https://api.github.com/user
s/Ekultek/orgs","repos_url":"https://api.github.com/users/Ekultek/repos","events
_url":"https://api.github.com/users/Ekultek/events{/privacy}","received_events_u
rl":"https://api.github.com/users/Ekultek/received_events","type":"User","site_a
dmin":false}],"milestone":null,"comments":11,"created_at":"2016-11-29T12:42:07Z"
,"updated_at":"2016-12-01T13:55:21Z","closed_at":null,"body":"### Before you cre
ate an issue please make sure that there are no issues that relate to your issue
 you are trying to create, \r\nif there is an issue that relates to this, please
 add a comment to that one and describe your specific problem. There is\r\nalso
a self help guide under the docs folder. Look through the troubleshooting and se
lf help for help.\r\n--\r\n\r\n### Issue (be specific)\r\nAfter a -s Scan on a W
ebpage, Whitewidow \"encountered an error and cannot continue\".. It totally sto
ps the scan, also outputs a bunch of encoding errors\r\n\r\n### Exact error mess
age\r\nruby whitewidow.rb -s browsergames.info\r\n[13:33:46 INFO] Found http://w
ww.w3.org/1999/xhtml\r\n[13:33:46 INFO] Found http://www.w3.org/2003/g/data-view
\r\n[13:33:46 INFO] Found http://www.w3.org/StyleSheets/TR/base\r\n[13:33:46 INF
O] Found http://www.w3.org/2008/07/rdfa-xslt\r\n[13:33:46 INFO] Found http://www
.w3.org/2003/g/data-view#\r\n[13:33:47 INFO] Found http://www.w3.org/1999/xhtml\
r\n[13:33:47 INFO] Found http://www.w3.org/2008/07/rdfa-xslt\r\n[13:33:47 INFO]
Found http://www.w3.org/\r\n...\r\nencoding error : output conversion failed due
 to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencodi
ng error : output conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47
\r\nI/O error : encoder error\r\n...\r\nencoding error : output conversion faile
d due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\ne
ncoding error : output conversion failed due to conv error, bytes 0x89 0x50 0x4E
 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error : output conversion
failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error
\r\nencoding error : output conversion failed due to conv error, bytes 0x89 0x50
 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error : output conver
sion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder
error\r\nencoding error : output conversion failed due to conv error, bytes 0x89
 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error : output c
onversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : enc
oder error\r\nencoding error : output conversion failed due to conv error, bytes
 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error : out
put conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error
: encoder error\r\nencoding error : output conversion failed due to conv error,
bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\nencoding error : outpu
t conversion failed due to conv error, bytes 0xFF 0xC3 0x98 0xC3\r\nI/O error :
encoder error\r\n...\r\nencoding error : output conversion failed due to conv er
ror, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error :
output conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O err
or : encoder error\r\n...\r\nencoding error : output conversion failed due to co
nv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding err
or : output conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/
O error : encoder error\r\n...\r\nencoding error : output conversion failed due
to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencodin
g error : output conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\
r\nI/O error : encoder error\r\n...\r\nencoding error : output conversion failed
 due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nen
coding error : output conversion failed due to conv error, bytes 0x89 0x50 0x4E
0x47\r\nI/O error : encoder error\r\nencoding error : output conversion failed d
ue to conv error, bytes 0xFF 0xC3 0x98 0xC3\r\nI/O error : encoder error\r\n...\
r\nencoding error : output conversion failed due to conv error, bytes 0xA2 0x3C
0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : output conversion fai
led due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\
nencoding error : output conversion failed due to conv error, bytes 0xFF 0xC3 0x
98 0xC3\r\nI/O error : encoder error\r\n...\r\nencoding error : output conversio
n failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder err
or\r\nencoding error : output conversion failed due to conv error, bytes 0x89 0x
50 0x4E 0x47\r\nI/O error : encoder error\r\nencoding error : output conversion
failed due to conv error, bytes 0xFF 0xC3 0x98 0xC3\r\nI/O error : encoder error
\r\n...\r\nencoding error : output conversion failed due to conv error, bytes 0x
A2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : output conver
sion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder
error\r\n...\r\nencoding error : output conversion failed due to conv error, byt
es 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : output c
onversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : enc
oder error\r\n...\r\nencoding error : output conversion failed due to conv error
, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : out
put conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error
: encoder error\r\n...\r\nencoding error : output conversion failed due to conv
error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error
: output conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O e
rror : encoder error\r\nencoding error : output conversion failed due to conv er
ror, bytes 0xFF 0xC3 0x98 0xC3\r\nI/O error : encoder error\r\n...\r\nencoding e
rror : output conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\n
I/O error : encoder error\r\nencoding error : output conversion failed due to co
nv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencod
ing error : output conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x7
0\r\nI/O error : encoder error\r\nencoding error : output conversion failed due
to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\n
encoding error : output conversion failed due to conv error, bytes 0xA2 0x3C 0x2
F 0x70\r\nI/O error : encoder error\r\nencoding error : output conversion failed
 due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n..
.\r\nencoding error : output conversion failed due to conv error, bytes 0xA2 0x3
C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : output conversion f
ailed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\
r\nencoding error : output conversion failed due to conv error, bytes 0xFF 0xC3
0x98 0xC3\r\nI/O error : encoder error\r\n...\r\nencoding error : output convers
ion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder e
rror\r\nencoding error : output conversion failed due to conv error, bytes 0x89
0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error : output co
nversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : enco
der error\r\nencoding error : output conversion failed due to conv error, bytes
0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\nencoding error : output conv
ersion failed due to conv error, bytes 0xFF 0xC3 0x98 0xC3\r\nI/O error : encode
r error\r\n...\r\nencoding error : output conversion failed due to conv error, b
ytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : output
 conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : e
ncoder error\r\n...\r\nencoding error : output conversion failed due to conv err
or, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : o
utput conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O erro
r : encoder error\r\n...\r\nencoding error : output conversion failed due to con
v error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding erro
r : output conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O
 error : encoder error\r\n...\r\nencoding error : output conversion failed due t
o conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding
 error : output conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r
\nI/O error : encoder error\r\nencoding error : output conversion failed due to
conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nenc
oding error : output conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0
x70\r\nI/O error : encoder error\r\nencoding error : output conversion failed du
e to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\nencod
ing error : output conversion failed due to conv error, bytes 0xFF 0xC3 0x98 0xC
3\r\nI/O error : encoder error\r\n...\r\nencoding error : output conversion fail
ed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\n
encoding error : output conversion failed due to conv error, bytes 0x89 0x50 0x4
E 0x47\r\nI/O error : encoder error\r\nencoding error : output conversion failed
 due to conv error, bytes 0xFF 0xC3 0x98 0xC3\r\nI/O error : encoder error\r\n..
.\r\nencoding error : output conversion failed due to conv error, bytes 0xA2 0x3
C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : output conversion f
ailed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\
r\nencoding error : output conversion failed due to conv error, bytes 0xFF 0xC3
0x98 0xC3\r\nI/O error : encoder error\r\n...\r\nencoding error : output convers
ion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder e
rror\r\nencoding error : output conversion failed due to conv error, bytes 0x89
0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error : output co
nversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : enco
der error\r\nencoding error : output conversion failed due to conv error, bytes
0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error : outp
ut conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error :
 encoder error\r\nencoding error : output conversion failed due to conv error, b
ytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error :
 output conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O er
ror : encoder error\r\nencoding error : output conversion failed due to conv err
or, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n[13:37:17 INFO] Fo
und http://www.w3.org/1999/xhtml\r\n[13:37:17 INFO] Found http://www.browsergame
s.info/index.php?a=out&u='\r\n[13:37:18 INFO] Found http://www.browsergames.info
/index.php?a=out&go=1&u=mafiakoenig\r\n[13:37:18 INFO] Found http://www.browserg
ames.info/index.php?a=out&go=1&u=mafiakoenig\r\n[13:37:18 INFO] Found http://www
.browsergames.info/\r\n[13:37:18 INFO] Found http://www.browsergames.info/\r\n[1
3:37:18 INFO] Found http://www.browsergames.info/\r\n[13:37:19 INFO] Found http:
//www.browsergames.info/index.php?a=join\r\n[13:37:19 INFO] Found http://www.bro
wsergames.info/index.php?a=user_cpl\r\n[13:37:19 INFO] Found http://www.browserg
ames.info/index.php?a=out&go=1&u=rlk\r\n[13:37:19 INFO] Found http://js.adscale.
de/getads.js\r\n[13:37:19 INFO] Found http://js.adscale.de/getads.js\r\n[13:37:2
0 INFO] Found http://www.facebook.com/pages/browsergamesinfo/240976396022694\r\n
[13:37:20 INFO] Found http://www.browsergames.info/index.php?a=page&amp;id=impre
ssum\r\nencoding error : output conversion failed due to conv error, bytes 0xA2
0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding error : output conversio
n failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder err
or\r\n...\r\n[13:37:23 INFO] Found http://www.facebook.com/pages/browsergamesinf
o/240976396022694\r\n[13:37:23 INFO] Found http://www.browsergames.info/index.ph
p?a=page&amp;id=impressum\r\nencoding error : output conversion failed due to co
nv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder error\r\nencoding err
or : output conversion failed due to conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/
O error : encoder error\r\nencoding error : output conversion failed due to conv
 error, bytes 0xFF 0xC3 0x98 0xC3\r\nI/O error : encoder error\r\n...\r\nencodin
g error : output conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\
r\nI/O error : encoder error\r\nencoding error : output conversion failed due to
 conv error, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\nencoding
error : output conversion failed due to conv error, bytes 0xFF 0xC3 0x98 0xC3\r\
nI/O error : encoder error\r\n[13:37:28 INFO] Found http://www.w3.org/1999/xhtml
\r\n[13:37:28 INFO] Found http://www.browsergames.info/index.php?a=out&u='\r\n[1
3:37:28 INFO] Found http://www.browsergames.info/index.php?a=out&go=1&u=mafiakoe
nig\r\n[13:37:28 INFO] Found http://www.browsergames.info/index.php?a=out&go=1&u
=mafiakoenig\r\n[13:37:28 INFO] Found http://www.browsergames.info/\r\n[13:37:29
 INFO] Found http://www.browsergames.info/\r\n[13:37:29 INFO] Found http://www.b
rowsergames.info/\r\n[13:37:29 INFO] Found http://www.browsergames.info/index.ph
p?a=join\r\n[13:37:29 INFO] Found http://www.browsergames.info/index.php?a=user_
cpl\r\n[13:37:29 INFO] Found http://www.browsergames.info/index.php?a=out&go=1&u
=rlk\r\n[13:37:30 INFO] Found http://js.adscale.de/getads.js\r\n[13:37:30 INFO]
Found http://js.adscale.de/getads.js\r\n[13:37:30 INFO] Found http://www.faceboo
k.com/pages/browsergamesinfo/240976396022694\r\n[13:37:30 INFO] Found http://www
.browsergames.info/index.php?a=page&amp;id=impressum\r\nencoding error : output
conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : en
coder error\r\nencoding error : output conversion failed due to conv error, byte
s 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error : ou
tput conversion failed due to conv error, bytes 0xB3 0x3C 0x2F 0x70\r\nI/O error
 : encoder error\r\nencoding error : output conversion failed due to conv error,
 bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\n...\r\nencoding error
 : output conversion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O
error : encoder error\r\nencoding error : output conversion failed due to conv e
rror, bytes 0x89 0x50 0x4E 0x47\r\nI/O error : encoder error\r\nencoding error :
 output conversion failed due to conv error, bytes 0xFF 0xC3 0x98 0xC3\r\nI/O er
ror : encoder error\r\n[13:37:42 INFO] Found http://www.w3.org/1999/xhtml\r\n[13
:37:43 INFO] Found http://www.browsergames.info/index.php?a=out&u='\r\n[13:37:43
 INFO] Found http://www.browsergames.info/index.php?a=out&go=1&u=mafiakoenig\r\n
[13:37:43 INFO] Found http://www.browsergames.info/index.php?a=out&go=1&u=mafiak
oenig\r\n[13:37:43 INFO] Found http://www.browsergames.info/\r\n[13:37:43 INFO]
Found http://www.browsergames.info/\r\n[13:37:44 INFO] Found http://www.browserg
ames.info/\r\n[13:37:44 INFO] Found http://www.browsergames.info/index.php?a=joi
n\r\n[13:37:44 INFO] Found http://www.browsergames.info/index.php?a=user_cpl\r\n
[13:37:44 INFO] Found http://www.browsergames.info/index.php?a=out&go=1&u=rlk\r\
n[13:37:44 INFO] Found http://js.adscale.de/getads.js\r\n[13:37:45 INFO] Found h
ttp://js.adscale.de/getads.js\r\n[13:37:45 INFO] Found http://www.facebook.com/p
ages/browsergamesinfo/240976396022694\r\n[13:37:45 INFO] Found http://www.browse
rgames.info/index.php?a=page&amp;id=impressum\r\nencoding error : output convers
ion failed due to conv error, bytes 0xA2 0x3C 0x2F 0x70\r\nI/O error : encoder e
rror\r\nencoding error : output conversion failed due to conv error, bytes 0x89
0x50 0x4E 0x47\r\nI/O error : encoder error\r\n[13:37:45 ERROR] browsergames.inf
o encountered an error and cannot continue.\r\n\r\n\r\n### Steps to reproduce\r\
nMake an Scan on browsergames.info\r\n\r\n### Search query if applicable\r\n-s b
rowsergames.info\r\n\r\n### Whitewidow version number\r\n1.7.2.9\r\n\r\n### Ruby
 version number\r\nruby 2.3.1p112 (2016-04-26) [i386-linux-gnu]\r\n\r\n### Label
s\r\n\r\n - [X] Bug\r\n - [X] Encoding\r\n - [ ] Enhancement\r\n - [ ] Question\
r\n - [ ] Email request"}]
#
[{“url”:”https://api.github.com/repos/WhitewidowScanner/whitewidow/issues/30“,”r
地址url“:”https://api.github.com/repos/WhitewidowScanner/whitewidow“labe
ls_url:“”https://api.github.com/repos/WhitewidowScanner/whitewidow/issues/30/lab
els{/name},“注释\u url”:https://api.github.com/repos/WhitewidowScanner/white
寡妇/问题/30/评论,“事件\u url”:https://api.github.com/repos/WhitewidowS
canner/whitewidow/issues/30/events,“html_url”:”https://github.com/WhitewidowSca
nner/whitewidow/issues/30,“id”:192271670,“编号”:30,“标题”:“编码错误w”
第i个递归蜘蛛,“用户”:{“登录”:“Shazgul”,“id”:20743799,“化身url”:“http
s://avatars.githubusercontent.com/u/20743799?v=3,“gravatar_id:”“url:”“https:
//api.github.com/users/Shazgul,“html_url”:https://github.com/Shazgul“followe”
rs_url:“”https://api.github.com/users/Shazgul/followers,“以下网址”:“https:
//api.github.com/users/Shazgul/following{/other_user},“gists_url”:https://api.
github.com/users/Shazgul/gists{/gist_id},“带星星的url”:https://api.github.com/
users/Shazgul/starred{/owner}{/repo},“订阅地址”:https://api.github.co
m/users/Shazgul/subscriptions,“组织机构url”:https://api.github.com/users
/Shazgul/orgs,“报告url”:https://api.github.com/users/Shazgul/repos“,”事件_
url:“”https://api.github.com/users/Shazgul/events{/隐私},“收到的事件”
l:“”https://api.github.com/users/Shazgul/received_events,“类型”:“用户”,“站点”\u广告
min“:false},“标签”:[{“id”:490987868,“url”:”https://api.github.com/repos/Whitew
idowScanner/whitewidow/labels/ENCODING,“name”:“ENCODING”,“color”:“b60205”,“defa”
ult:false},{“id”:458176860,“url”:https://api.github.com/repos/WhitewidowScanne
r/whitewidow/labels/temp%20fix,“名称”:“temp fix”,“颜色”:“c2e0c6”,“默认值”:fal
se},{“id”:480395818,“url”:”https://api.github.com/repos/WhitewidowScanner/whitew
idow/标签/测试,“名称”:“测试”,“颜色”:“d4c5f9”,“默认值”:false}],“状态”
:“打开”,“锁定”:假,“受让人”:{“登录”:“Ekultek”,“id”:14183473,“化身url”:
"https://avatars.githubusercontent.com/u/14183473?v=3,“gravatar_id:”,“url:“h”
ttps://api.github.com/users/Ekultek,“html_url”:https://github.com/Ekultek“,”fo
llowers_url:“”https://api.github.com/users/Ekultek/followers“,“以下url”:“h”
ttps://api.github.com/users/Ekultek/following{/other_user},“gists_url”:“https:/
/api.github.com/users/Ekultek/gists{/gist_id},“带星星的url”:https://api.github
.com/users/Ekultek/starred{/owner}{/repo},“订阅地址”:https://api.gith
ub.com/users/Ekultek/subscriptions,“组织url”:https://api.github.com/
用户/Ekultek/orgs,“repos_url”:https://api.github.com/users/Ekultek/repos“,”电动汽车
(网址):"https://api.github.com/users/Ekultek/events{/隐私}“,”收到{u偶数
(网址):"https://api.github.com/users/Ekultek/received_events,“类型”:“用户”,“si”
te_admin:false},“受让人”:[{“登录”:“Ekultek”,“id”:14183473,“化身url”:“htt”
ps://avatars.githubusercontent.com/u/14183473?v=3,“gravatar_id:”“url:”“https
://api.github.com/users/Ekultek,“html\u url”:https://github.com/Ekultek“,”跟随
ers_url:“”https://api.github.com/users/Ekultek/followers,“以下url”:“https”
://api.github.com/users/Ekultek/following{/other_user},“gists_url”:https://api
.github.com/users/Ekultek/gists{/gist_id},“带星星的url”:https://api.github.com
/用户/Ekultek/starred{/owner}{/repo},“订阅地址”:https://api.github.c
om/users/Ekultek/SUBSCRIPTION,“组织机构url”:https://api.github.com/user
s/Ekultek/orgs,“报告url”:https://api.github.com/users/Ekultek/repos“,”事件
_url:“”https://api.github.com/users/Ekultek/events{/隐私}”,“收到的事件”
rl:“”https://api.github.com/users/Ekultek/received_events,“类型”:“用户”,“站点”
dmin:false}],“里程碑”:null,“评论”:11,“创建时间”:“2016-11-29T12:42:07Z”
,“更新时间”:“2016-12-01T13:55:21Z”,“关闭时间”:“空”,正文:“####”
解决问题请确保没有与您的问题相关的问题
您正在尝试创建,\r\n如果存在与此相关的问题,请
在该问题上添加注释并描述您的具体问题。还有\r\n其他问题
docs文件夹下的自助指南。查看疑难解答和se
lf help获取帮助。\r\n--\r\n\r\n#####问题(请具体说明)\r\n在对W进行a-s扫描后
ebpage,Whitewidow \“遇到错误,无法继续\”。它完全停止
ps扫描时,还会输出一系列编码错误\r\n\r\n####确切错误信息
年龄\r\nruby whitewidow.rb-s browsergames.info\r\n[13:33:46 info]找到http://w
ww.w3.org/1999/xhtml\r\n[13:33:46信息]已找到http://www.w3.org/2003/g/data-view
\r\n找到[13:33:46信息]http://www.w3.org/StyleSheets/TR/base\r\n[13:33:46 INF
O] 发现http://www.w3.org/2008/07/rdfa-xslt\r\n找到[13:33:46信息]http://www
.w3.org/2003/g/data view#\r\n[13:33:47 INFO]已找到http://www.w3.org/1999/xhtml\
r\n找到[13:33:47信息]http://www.w3.org/2008/07/rdfa-xslt\r\n[13:33:47信息]
建立http://www.w3.org/\r\n…\r\n编码错误:由于
要转换错误,字节0xA2 0x3C 0x2F 0x70\r\n I/O错误:编码器错误\r\n nencodi
ng错误:由于conv错误,输出转换失败,字节为0x89 0x50 0x4E 0x47
\r\n输入/输出错误:编码器错误\r\n…。\r\n编码错误:输出转换失败
d由于conv错误,字节0xA2 0x3C 0x2F 0x70\r\n错误:编码器错误\r\n
编码错误:由于conv错误,输出转换失败,字节为0x89 0x50 0x4E
0x47\r\n I/O错误:编码器错误\r\n…\r\n编码错误:输出转换
由于conv错误而失败,字节0xA2 0x3C 0x2F 0x70\r\n I/O错误:编码器错误
\r\n编码错误
URI("https://api.github.com/repos/#{repo_owner}/#{repo_name}/issues?client_id=#{ID}&client_secret=#{SECRET}")
request = Net::HTTP::Post.new url.request_uri
    request.basic_auth user, pass
body = {
  title: "Test Issue # 1",
  body: "test"
}

body = JSON.generate(body)
request.body = body
request["Content-Type"] = "application/json"