Category "python-requests"

How to change URL for beautifulsoup scraper every time the program runs (without doing it manually)?

I have the following code to scrape Reddit usernames: from bs4 import BeautifulSoup from requests import get from fake_useragent import UserAgent

How to get progress of file upload using requests.post() if the file was just uploaded via form-data? (Not sure whether this is a streaming process)

Suppose I'm running some kind of web service with python & flask aiming to provide file upload. It should be noted that my service is only a kind of transfe

How I can change my ip address with python requests

I write a code for get some data with a fake ip. but my code don't work correctly import requests proxies = {"https://": "https://190.71.22.98:8080",} r = requ

scraping NYT mini crossword stats gives 403 forbidden URL error

I'm trying to scrape my NYT mini crossword stats to then update a google sheet. But I'm having trouble with the login portion of the code. Here's my code so far

Simulating a request with Hmac signature

I am trying to send a request after reverse engineering a private API, but the headers have these two elements that are crucial for the success of sending this

Python and CloudFlare issue

I hit the wall trying to make request to https://1stkissmanga.io/ due to CloudFlare protection. I prepared header and cookie (which i read from Firefox) but sti

How to convert Curl SSL and auth request to Python code

I would like to convert my request written in Curl to Python. I'm ignoring ssl becouse this certificate is signed by me. I am not sure if I have correctly repla

Cannot import name 'get' from partially initialized module 'requests'

I have problem with requests package. In past requests was working, but today for no reason it stopped working. I am just importing requests and it cause error.

Trying to Upload database file using python requests and sending to django API

Hi I have a database file. I want to send this database file via python requests post method to my django server and store this database file somewhere in my se

Successful API call but no data returned

I'm trying to request data from api.travelpayouts to find cheap flights, but even after trying exact examples from their documentation I'm not returning any dat

Download image with python requests

I'm new to python. I have to download some images from the web and save it to my local file system. I've noticed that the response content does not contain any

How to fetch data that is in JSON format from an API using python to a .db file

I have an API: https://baseballsavant.mlb.com/gf?game_pk=635886 I want to fetch the data from here (which is in JSON format) using a python code and create a ta

HERE Matrix Routing API - "Method not allowed for this action"

I am trying to get a reference example working, but the API throws a 405 error: import requests import json url = 'https://matrix.router.hereapi.com/v8/matrix'

BeautifulSoup request is returning an empty list from LinkedIn.com/jobs

I'm new to BeautifulSoup and web scraping so please bare with me. I'm using Beautiful soup to pull all job post cards from LinkedIn with the title "Security Eng

Python ImportError: sys.meta_path is None, Python is likely shutting down

When using __del__ datetime.date.today() throws ImportError: sys.meta_path is None, Python is likely shutting down import datetime import time import sys clas

Problem with exception handling using Python requests module

The following part of my code is supposed to do exception handling during HTTP requests. app.py class Get: def __init__(self, url): self.url = url

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