Questions tagged [python-requests]

USE ONLY FOR THE PYTHON REQUESTS LIBRARY. Requests is a full-featured Python HTTP library with an easy-to-use, logical API.

19,717 questions
0votes
0answers
31views

How to insert data in csv file using Python

im having a problem with my Python script. Basically what my script does is first it does a GET request to our API and extracts all ID's from the endpoint and then saves it in a CSV file. Atm im ...
0votes
0answers
22views

how to watch instagram stories using python

i want to make a code to get a user stories and watch them how should i do this ? should we use requests or there is a function in this lib ? from instagram_private_api import Client # Vars user_name ...
0votes
0answers
15views

I can't consume api, I can't log in with python requests

I can't consume api, I can't log in with python requests. I have tried passing the username and password data through "auth", but it continues to give me a 400 error. I send the data as json,...
0votes
0answers
24views

Python Selenium add a cookie from Chrome Browser

I have some cookie that I see from my Chrome -> Applications -> Cookies. It looks like this: Now I convert this cookie to json so I can add it in the Selenium driver. My code looks like this: ...
1vote
2answers
46views

How to specify source IP address in python requests [duplicate]

I have several IP addresses configured on my network interface card. I need to specify through which IP address python requests must connect to the web server. Is it possible? import requests r = ...
0votes
0answers
17views

Split some files by chunks in POST to get output from function with requests and flask

My goal is to send some files to server and apply function f([files]) to get output by POST-request. POST request: req = requests.post(self.server, files = {'file1': open(file1, 'rb'), 'file2': open(...
0votes
1answer
26views

Python: urllib3 errors where requests works

I have the following code http = urllib3.PoolManager() resp = http.request( "GET", "https://api.nhs.uk/medicines/aciclovir", headers={ "subscription-key&...
  • 3,473
-1votes
1answer
19views

Connection Aborted Error when scraping with requests module

I'm using the request module to do some web scraping in python, but everytime i send the requests with headers and proxies, i get a connection aborted error, even though i've been told that it would ...
0votes
0answers
16views

How to make a get request with each value in an entire array

def get_listing_ids(): response = requests.get('apiurl', params=params, cookies=cookies, headers=headers) response_data_ids = response.json() listing_ids = [result['id'] for ...
0votes
1answer
22views

Checking proxies with python

I want to check if a proxy is alived or not using python. To do that, my approach was to use request like: import requests proxies = [] for i in proxies: prox = {"prox": f"http://{...
0votes
0answers
21views

How to format a new function to use each part of an array in a request URL

response = requests.get('requestURL', params=params, cookies=cookies, headers=headers) response_data_ids = response.json() listing_ids = [result['id'] for result in response_data_ids['results']] ...
-1votes
0answers
23views

How to disable discord community [closed]

so I'm trying to see if its possible to make a command for a discord bot using python that will disable the community when the command is called. @client.command() async def disablecommunity(ctx): ...
0votes
0answers
21views

Locust FastHttpUser class requests get 422 status code

I'm using Locust library for my load tests. Everything works pretty well but when I try to replace my HttpUser class with FastHttpUser class, all of my requests fail with a 422 status code. This is ...
0votes
0answers
32views

How to read octet-stream response

I'm trying to post video to LinkedIn using Python. I was able to post video using curl commands. In step 2 curl command: curl -v \ -H "Content-Type:application/octet-stream" \ --upload-...
0votes
1answer
24views

Requests Not Creating Images Python

I want to download images. But for some reason the code execute without errors but it's not creating any images.I'm using Requests and BeautifulSoup. My IDE is VS Code HEADERS = {'User-Agent': "...
  • 209

153050per page