Category "python-requests"

Is there any way to limit json request items?

Is there any way to limit how many items I want to get from a JSON request? the code I use: import json import requests url = 'https://api.github.com/users' re

Python Login to UPS.com returns 403

I had a script that would login to my UPS.com account to receive all incoming packages. The following code was working for a while but not anymore: import reque

GraphQL Request in Pytho

I don't know how to solve this problem i'm trying a long time now but i'm stuck. I've tried different Libarys for GraphQL requests but nothing is working so tha

Retrieving data from the Air Quality Index (AQI) website through the API and only recieving small nr. of stations

I'm working on a personal project and I'm trying to retrieve air quality data from the https://aqicn.org website using their API. I've used this code, which I'v

Python Web Scrape Request resulting in a 406 Error

I am trying to scrape https://registry.verra.org/app/search/VCS/All%20Projects for a school project. I am trying to send a request to the "download excel" butto

Scrape Website that is running meteor, using python requests

You see, there is this website called edabit. All you need to know is that I want to scrape the website without using selenium. I want to learn how. What does s

crawl website with requests and problem is Object.setPrototypeOf

i'm trying to crawl website with python requests GET and having problem with Object.setPrototypeOf i added userAgent in header but it still gives me under code

Getting a 400 Response Spotify API Python

I am trying to use requests.get with the Spotify API and I can't figure out why I keep getting a 400 response. I am working in an .ipynb file in Jupyter Lab run

Invalid syntax error using Requests library with Python 2.7

I'm using the Requests library with Python 2.7 and get the following error: Traceback (most recent call last): File "/home/user/Documents/workspaces/controlle

What exactly causes the "unable to get local issuer certificate" error when accessing an otherwise accessible (via browser) website URL?

I'm on macOS Monterey 12.3 running Python 3.9.7 installed via brew. Given this minimal replication of my production code: import requests try: response = r

POST request to FastAPI using Python Requests with a file and query parameters

I am using FastAPI to serve some ML models and I have a Streamlit basic UI using Python Requests module. One of my service is getting an image through a POST re

Django PDF parser on POST request

I hope for your help. Because I have been struggling with this problem for a long time. A POST request comes from the frontend with one PDF file, after which I

How to send multiple files with Python requests to FastAPI server?

I have the following endpoint in my FastAPI server: @app.post("/submit") async def submit(file1: List[UploadFile] = File(...), file2: List[UploadFile] = File(..

Unable to connect to a url with python request module

I'm unable to connect to the URL using requests module, but it works fine when browsed in a browser. Could it be some robots.txt issue Allowed/Disallowed issue

Loading Captcha image form a site does not work

I am trying to collect Captcha images using the Python requests module and save them to file or load in memory for further processing, but nothing works as belo

scrapy post request not updating data in airtable

I need to create records in an airtable base and have the following code in scrapy: url = "https://api.airtable.com/v0/appuhKmlhLIIEszLm/Table%201" payload = j

Unzipping the zipfiles within a url zipfile python

I can unzip a url zip file of csvs using the below code: import requests from zipfile import ZipFile from io import BytesIO import pandas as pd z = 'www.someur

How to import other Python files

I have this file, abc.py: def asb(): print("Hello, ") def xyz(): print("World!") In my main.py file, from abc import asb from abc import xyz I want

How to bypass Cloudflare with Python on GET requests?

I want to bypass Cloudflare on a GET request I have tried using Cloudscraper which worked for me in the past but now seems decreped. I tried: import cloudscrape

Proper syntax of parameters using function run_in_executor()

To make a POST call to the API, I use the following script: r = requests.post( url, headers={ "Content-Type": "application/json" }, json