Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import requests
def get_(data):
headers={'User-Agent':'curl/7.12.1 ',
'Content-Type':'application/json'}
try:
r = requests.post(url='https://ssl.bing.com/webmaster/api.svc/json/SubmitUrl?apikey=API_KEY',json=data)
print(r.status_code)
print(r.content)
except Exception.e:
print(e)
#Example:
cjhpush={
"siteUrl": "https://cjh0613.github.io",
"url": "https://cjh0613.github.io/index.html"
}
print(cjhpush)
get_(cjhpush)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment