Skip to main content

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.

Filter by
Sorted by
Tagged with
5 votes
3 answers
577 views

From my previous post, I tried to take into account all of the nice answers made by Kate, Chris, J_H, Booboo and mudskipper Changes made In short, I attempted to apply all of the following: API key ...
Chip01's user avatar
  • 687
8 votes
5 answers
1k views

Why I made it I’m building a voice assistant and thought it would be great if it could deliver news updates. What it does It cleans up the user’s query, determines whether it refers to a news category ...
Chip01's user avatar
  • 687
4 votes
4 answers
167 views

This code checks the Israeli Home Front Command API, and when there is a new alert for specific areas it sends a request to a Django app which I am hosting in the cloud. The Django app then sends a ...
Kovy Jacob's user avatar
4 votes
2 answers
144 views

Is there a way to improve this method that interacts with ADP's workforce-now API? 200: capture and parse JSON 204: return a None 400 and 403: return specific text from JSON others: throw an ...
craig's user avatar
  • 235
1 vote
2 answers
179 views

I'm trying to access an API using the requests library in as clean a manner as possible. The API is accessing various settings of various devices. I'd like to keep my code as readable and ...
Floriancitt's user avatar
4 votes
2 answers
978 views

I wanted to make a small self-integrated API for my PyQt5 application. This class is a tiny chunk of the whole project: ...
KhodeNima's user avatar
  • 419
1 vote
0 answers
2k views

I am taking beginner steps into DE and was tinkering with writing an ingestion script which does the following tasks: Reads data from a source (in this case a remote parquet file) Writes it to local ...
av abhishiek's user avatar
3 votes
1 answer
83 views

I recently wrote a testing tool (called plink) for retrieving all the links from a website (and then retreiving links from the linked pages, and so on). Essentially,...
Jessica's user avatar
  • 910
4 votes
1 answer
158 views

I've struggled to make a small stock project for almost 5 hours (biggest one so far). The project is simple: I've chosen a stock (Tesla in my case) and I've decided to get a message on my phone with ...
biscuit_delicious's user avatar
1 vote
1 answer
241 views

I am making a program that parses profiles from a website. Some profiles are "public" and others are "private" with limited information. Public profiles contain a lot more data and ...
angel's user avatar
  • 35
5 votes
3 answers
2k views

I am using the requests library to make requests to an API. However, I am not sure how to handle different status codes. I am particularly interested in handling ...
heuristic_type's user avatar
1 vote
0 answers
502 views

I am a beginnner and have put up a code that talks to pagerduty API and then it fethces oncall info for a team (get team id, get escalation policy id, then finally get on call info). response is ...
AhmFM's user avatar
  • 131
2 votes
1 answer
111 views

Looking for a more efficient way of achieving this. In particular the combine_all_rss_lists so I don't need all those params. Feedparser module doesn't accept lists which is why I've had to initially ...
Luca's user avatar
  • 67
3 votes
1 answer
70 views

On last test, the below code takes approximately 10 seconds to download then print the data from 10 url's. I wish to speed this up as much as possible as later on I plan to expand this further and use ...
Luca's user avatar
  • 67
2 votes
1 answer
184 views

I've written a small script for Zabbix to check the status of our ESXi Hosts. The request needs to be authenticated, so I went for this process: Read auth token from file If file does not exist, ...
Gerald Schneider's user avatar
2 votes
1 answer
335 views

I wrote a function to download a large zipfile 5-7gb from Iowa State MRMS data archive. The zip files appear to be malformed and results in a BadZipFileError hence ...
Jason Leaver's user avatar
2 votes
1 answer
163 views

I have been writing a monitoring script where I check for whenever there is changes on a webpage. When a change has happend I want to be notified by printing out that there is a difference. I have ...
PythonNewbie's user avatar
2 votes
1 answer
151 views

Hello beautiful people! I have currently worked on a small script that I would of course continue to work with whenever I get a good feedback from the best code reviewer in here <3 - I have worked ...
PythonNewbie's user avatar
1 vote
1 answer
5k views

I wrote this script for gaining experience, this script takes in a website link (NSFW) and download the video on that site. It uses regular expressions to parse the website source code to extract urls ...
User's user avatar
  • 201
9 votes
2 answers
2k views

I wrote the following script to parse an SEP article and call pandoc to convert it to EPUB. I'd love your feedback. There is no function but I didn't think it was worth adding. Also there is no test ...
user avatar
1 vote
2 answers
140 views

I am using Python scraper code to grab publicly available data from http://103.48.16.132/echalan/, but it takes almost 6gb of memory and more cpu. I need to run ...
Learner's user avatar
  • 119
3 votes
1 answer
371 views

Request to review my code please and see if I am following the best practices. This is sending a POST operation via a Python script using the requests library to a networking cloud orchestration ...
pythontestuser's user avatar
1 vote
1 answer
178 views

Please check over my Python code for a HTTP GET operation using the requests library, and provide any potential pointers for improvement. ...
pythontestuser's user avatar
1 vote
1 answer
84 views

The following code iterates over a table with nested th headings. The decision has been made to just go with the main heading and ignore sub-headings, but nested ...
Sati's user avatar
  • 427
3 votes
1 answer
125 views

The following code builds a rudimentary acupuncture database by collecting data from the web. I would like to hear suggestions about improvements to the database structure, code organization, web-...
Sati's user avatar
  • 427
4 votes
2 answers
114 views

All my code is below. It uses an API to search for a show and then outputs the providers (like breaking bad is available on Netflix). The main aim of this application was to practice using APIs and ...
Twam's user avatar
  • 41
1 vote
2 answers
197 views

I wrote a Python script for Web scraping of a Website. Please review my code and suggest me any changes or make me aware of my blunders/mistakes?. I wrote the almost same script for other websites ...
Muhammad Fahim's user avatar
1 vote
1 answer
283 views

I found interesting the way Python's requests library does the status_code data structure initialization (see code here). I am reusing it in a hobby project, but ...
Nestor's user avatar
  • 301
3 votes
1 answer
97 views

I wrote a simple Zoopla real estate scraper for just practicing what I learned so far in Python, Requests, BeautifulSoup and overall web scraping fundamentals. By looking at my code I feel like there ...
Tauqeer Abbas's user avatar
3 votes
1 answer
289 views

I am writing a benchmarking tool from scratch in Python. However I can't get the performance of other benchmarking tools like wrk or ...
Masudul Hasan Masud's user avatar
2 votes
2 answers
253 views

I have been working with requests where I as easy as it is. Scraping the webpage and add it into a dict and print the payload if we find a new value or not. ...
PythonNewbie's user avatar
2 votes
1 answer
2k views

Code is Working Review and Recommend What Are Best Practice What I am trying to achieve. API with Flask that runs any python file from the current directory. Run the file and get output in JSON ...
Qureshi Owais's user avatar
2 votes
2 answers
666 views

I would like to get some feed back on my code; the goal is to get all agencies address of banks. I wrote a pretty simple brute force algorithm. I was wondering if you would have any advice to improve ...
curious's user avatar
  • 333
2 votes
1 answer
96 views

I have been trying to improve my knowledge with Python and I think the code is pretty forward. However I do dislike abit the coding style I have done where I use too much try except in a content there ...
PythonNewbie's user avatar
2 votes
0 answers
288 views

Is there a better way to write this piece of code to extract data from a REST API with the requests library? It currently takes about 10 minutes to finish extracting the data from the REST API. I ...
Benb27's user avatar
  • 21
2 votes
1 answer
114 views

This is my first time web scraping, and here is the code I whipped up: ...
Chocolate's user avatar
  • 1,044
2 votes
1 answer
314 views

I am currently writing python code that scrapes information from the web. I have to scrape several sites, but there a two types of procedures: Directly scrape from the website Download pdf and scrape ...
FarFetched's user avatar
5 votes
2 answers
333 views

I am 12 days old into Python and web scraping and managed to write my first ever automation script. Please review my code and point out blunders If any. What do I want to achieve? I want to scrape ...
Faheem Akhtar's user avatar
3 votes
0 answers
901 views

The code below will scrape data from three APIs. The APIs are for property listings. So, for each listing, I will have one request. There will be around 20000 requests. That's why I use ayncio to make ...
JOHN's user avatar
  • 131
5 votes
0 answers
115 views

I'm designing a scraping application using python, requests and BeautifulSoup4. I decided to divide the logic into two classes: Spider : gets the base url ...
Iduoad's user avatar
  • 151
1 vote
1 answer
397 views

I'm trying to extend my coding skills to other languages by doing projects. (learned Java in school) and since python is very popular right now thats what I ended up choosing for this project, though ...
jbbouz's user avatar
  • 11
8 votes
1 answer
187 views

This is a Find unimplemented tasks task from Rosetta Code: Given the name of a language on Rosetta Code, find all tasks which are not implemented in that language. There is already a solution ...
Georgy's user avatar
  • 1,997
7 votes
1 answer
3k views

Question Recently I have tried to create a web scraping program to get data from Google Trends. It uses an RSS feed to do so. My question is as follows: How can I improve my code such that it is more ...
Ranch Mayonaise's user avatar
1 vote
1 answer
4k views

This is a simple toy downloader using python's requests library. I’ve monitored the download process is slower on an ethernet connected box. The realtime speed is ...
faquir's user avatar
  • 11
4 votes
1 answer
227 views

I've created a basic Python CLI script, which takes a Github username, and returns some basic information associated with said username. I use the requests for HTTP requests (I'm new to this area) and ...
Arnav Borborah's user avatar
5 votes
1 answer
5k views

I started practicing in web-scraping few days ago. I made this code to extract data from a wikipedia page. There are several tables that classify mountains based on their height. However there is a ...
brain_dead_cow's user avatar
5 votes
1 answer
455 views

Below is a portion of the code i have written to scrape the bikesales.com.au website for details of bikes for sales (The full code is here). This finds all the 'href' attributes on each search page ...
theotheraussie's user avatar
7 votes
2 answers
2k views

I have a simple python script that's repeating a HTTP response/request. I would like to know how I could have constructed this better, particularly if there's a way I could have incorporated the slice ...
Michael A's user avatar
  • 1,681
3 votes
1 answer
1k views

I created a PyCryptoScraper script to scrape crypto-currencies from Coingecko. Now I want to know if you could give me some hints or improvements for my script, which works fine. The whole code also ...
Patrick85's user avatar
  • 511
3 votes
1 answer
3k views

I wrote a Python script to download files using multiple (source) IP addresses -- kindly suggest any improvements. ...
avamsi's user avatar
  • 165