safe-browsing-api

How to fix the “Invalid JSON payload received. Unknown name” error

↘锁芯ラ 提交于 2020-04-15 20:26:14
问题 I try to get a proper response from the Google Safe Browsing API v4. Although I get the error "Invalid JSON payload received. Unknown name". I have used a payload based on the payload example mentioned at https://developers.google.com/safe-browsing/v4/lookup-api I have problems with the payload. I think it should be a string, not a real dict. When I use a dict I get the error: TypeError: has type , but expected one of: str, unicode The code I used is: result = urlfetch.fetch(url, method

How to fix the “Invalid JSON payload received. Unknown name” error

情到浓时终转凉″ 提交于 2020-04-15 20:25:43
问题 I try to get a proper response from the Google Safe Browsing API v4. Although I get the error "Invalid JSON payload received. Unknown name". I have used a payload based on the payload example mentioned at https://developers.google.com/safe-browsing/v4/lookup-api I have problems with the payload. I think it should be a string, not a real dict. When I use a dict I get the error: TypeError: has type , but expected one of: str, unicode The code I used is: result = urlfetch.fetch(url, method

How to fix the “Invalid JSON payload received. Unknown name” error

故事扮演 提交于 2020-04-15 20:25:10
问题 I try to get a proper response from the Google Safe Browsing API v4. Although I get the error "Invalid JSON payload received. Unknown name". I have used a payload based on the payload example mentioned at https://developers.google.com/safe-browsing/v4/lookup-api I have problems with the payload. I think it should be a string, not a real dict. When I use a dict I get the error: TypeError: has type , but expected one of: str, unicode The code I used is: result = urlfetch.fetch(url, method

how to check a list of URLs against google safe browsing database?

此生再无相见时 提交于 2019-12-13 04:38:58
问题 I have a list of URLs in a file (one URL per line) that I want to check their health against Google safe browsing database. I am following google's documentation on GitHub. I prefer to load the database locally as it is a huge list that will exhaust the rate limit of 10000 queries per day. I followed the instructions until this step: Once the Go environment is setup, run the following command with your API key: go get github.com/google/safebrowsing/cmd/sbserver sbserver -apikey $APIKEY After