When w = {“q”: “25”} is used, it returns the entire currency table, only the dollar exchange rate should be issued Answer So, just to filter by a particular country code, you can filter the json after it is returned.
Tag: python-requests
making multiple request at the same time with the module requests and print the output on excel(python)
Hi this is quite a complicated question From this script: The code by itself do what is supposed to do (getting the data:foward eps,peg ratio,sector and paste them on an excel file)but the issue is that it takes a lot of time and the list stock is quite long(2531 elements) is there a way to make this code more efficent
Python Web Scrape Query DIV data-brand
I’m trying to grab a div tag in an html page, but the result is showing an empty list. I’ve provided the code and a picture of the html. The page_text variable is an empty list. Answer You are close to your goal, just add True as value in your dict: As alternative you can go with css selectors and
Error handling in variables when using Requests
I have the below code that works fully up until I set x=37. At this point, I receive the error TypeError: ‘NoneType’ object is not subscriptable on the variable t[“vintage”][“wine”][“region”][“country”][“name”]. I have added another variable that the same issue happens on almost everytime, so you may find the error there instead. I think this is because one of the 25
Extracting Carbon offset projects from website using beautiful soup and getting nothing
I’m trying to extract the data from this website(‘https://alliedoffsets.com/#/profile/2). It has many such projects and I want to get the values of Estimated Average Wholesale Price and Estimated Annual Emission Reduction. When, I trying to print the code using beautiful soup it is not giving those tags and giving empty values. I know it could be a basic thing but
I suddenly receive no stream data from Twitter stream (requests.get(…2/tweets/search/stream))
I’m working on a screenshot bot for Twitter using Python. My app collects tweet from a filtered stream and replies with an image of the tweet. Yesterday, my bot worked well: connected to stream, and made replies. Today, it still connects to stream but returns nothing. Here is the code: I’ve searched everywhere I know for help on this issue.
How do you scrape a table from a website which is hosting the table data outside of the HTML?
I am trying to scrape the table data from this table URL: https://covid19criticalcare.com/pharmacies/ On my previous scrape I used the following Python packages: from bs4 import BeautifulSoup import requests import mysql.connector import pandas as pd from sqlalchemy import create_engine But this url’s HTML doesn’t contain the table data on it, instead it seems to be drawing the data from an
Python – Run multiple async functions simultaneously
I’m essentially making a pinger, that makes has a 2d list, of key / webhook pairs, and after pinging a key, send the response to a webhook the 2d list goes as follows: My program is essentially a loop, and I’m not too sure how I can rotate the some_list data, in the function. Here’s a little demo of what
How to identify a link from href based on string and class name?
I’m trying to get some data from https://betsapi.com/, specifically from the soccer area using python I saw in the code that the link is dynamic, I mean that a couple of weeks ago it was https://betsapi.com/cin/soccer and now is https://betsapi.com/cip/soccer. Looking on the code I would like to understand how to identify the current soccer link from this part of
What is the best way to combine multiple ndjson urls from a REST API?
My goal is to extract all of the urls and add a get request to each ndjson file; however, this can be complicated when there are more 10 urls. Is there a better way to do this or do I need to put multiple GET requests in and then join the ndjson files and then parse the data. Output: Output: