Request an url not working? /u/Rapid1898 Python Education

Hello – i try to request a specific url using the following code:

“` import requests import json

url = “https://www.minecraft.net/bin/minecraft/productmanagement.productsinfobytype.json?locale=en-us&type=skinpack&limit=16&skip=56” payload = {} headers = { “Accept”: “application/json, text/plain, /“, “Referer”: “https://www.minecraft.net/en-us/catalog?type=Skin%20Packs” }

resp = requests.request(“GET”, url, json=payload, headers=headers) erg = resp.json()

print(resp.status_code) print(erg) “`

But the program allways get stuck – nothing happens – i can only see this:

(xlwings) C:DEVNEU>python temp.py

Why is this request not working? When i try this with another api-url like

http://api.open-notify.org/astros.json

it is working fine…

submitted by /u/Rapid1898
[link] [comments]

​r/learnpython Hello – i try to request a specific url using the following code: “` import requests import json url = “https://www.minecraft.net/bin/minecraft/productmanagement.productsinfobytype.json?locale=en-us&type=skinpack&limit=16&skip=56” payload = {} headers = { “Accept”: “application/json, text/plain, /”, “Referer”: “https://www.minecraft.net/en-us/catalog?type=Skin%20Packs” } resp = requests.request(“GET”, url, json=payload, headers=headers) erg = resp.json() print(resp.status_code) print(erg) “` But the program allways get stuck – nothing happens – i can only see this: (xlwings) C:DEVNEU>python temp.py Why is this request not working? When i try this with another api-url like http://api.open-notify.org/astros.json it is working fine… submitted by /u/Rapid1898 [link] [comments] 

Hello – i try to request a specific url using the following code:

“` import requests import json

url = “https://www.minecraft.net/bin/minecraft/productmanagement.productsinfobytype.json?locale=en-us&type=skinpack&limit=16&skip=56” payload = {} headers = { “Accept”: “application/json, text/plain, /“, “Referer”: “https://www.minecraft.net/en-us/catalog?type=Skin%20Packs” }

resp = requests.request(“GET”, url, json=payload, headers=headers) erg = resp.json()

print(resp.status_code) print(erg) “`

But the program allways get stuck – nothing happens – i can only see this:

(xlwings) C:DEVNEU>python temp.py

Why is this request not working? When i try this with another api-url like

http://api.open-notify.org/astros.json

it is working fine…

submitted by /u/Rapid1898
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *