The program is running good but they will scrape only one TITLE I want they scrape all the title in the page These is the page link https://www.eurobike.com/en/index-exhibitors/exhibitors/? Answer The website is populated completely by complex JavaScript.First of all, to display listing from this url,acceptin…
Tag: python
Build tree/linked list from a list of Objects
I am trying to build a tree like hierarchy from modules and their respective submodules, each module has a name, data, and a list of its submodules, With this code I’m able to detect if something is a submodule of something else but I don’t know how I am supposed to form the connections/build the …
How to pass a variable to a different function (a different stage in ConversationHandler?)
So I have a bot which moves from stage to stage using the stage names as a product of return of each function. e.g. So in the end() function I need to pass the variables from functions getfile() and get_info() in the some_function. But I have no clue how to do it, because returning multiple values doesn’…
Functions executing out of order?
I have a problem currently that makes no sense to me whatsoever. I am making a program that runs a script on a website using the selenium web driver. This is paired with a GUI I made with Tkinter. In short, I have a “Launch” button in the gui that is set to trigger this function: “scriptR…
how to spead a list and put into a new column based on number of rows
lets say I have a brand of list: and I want this list to repeteadly fill a new column called category as much as my rows have. I want the first row have ‘a’, the second row have ‘b’, and the third row have ‘ab’, and the cycle repeats until the last rows like the example bel…
Print text from right side
May I know how to print text to the right side like: I only know center code is this: Thanks Edit str.rjust(165//2) is center text from: How to place input function in center of page? Answer You are doing well just try to use an int like this The first value is the amount of space de second is the
How to exact price from txt file based on the product input?
I’m fairly new to python and can’t solve this issue (I have already searched extensively) My aim is to complete a shopping program where the user inputs the product which the program then reads the associated txt file and returns the items price. This is my current code: The current output i get i…
How do I extract all keys from this JSON file?
The data I’m working with is the entire list of yugioh cards, found at this endpoint: https://db.ygoprodeck.com/api/v7/cardinfo.php There’s a top-level data node that I can ignore, but each sub-node immediately after that (0, 1, 2,…) is a unique card in the cardset. I want to find out how ma…
what would be the most efficient way to do this in pandas
I’m trying to figure out the most efficient way to join two dataframes such as below. I’ve tried pd.merge and maybe using the rank function but cannot seem to figure a way. Thanks in advance df1 What I’m trying to achieve is this df2 Answer You might want to use groupby with unstack as advis…
Find whether 1D sub-array is in 2D array
I have a data-array like: It has about 4000 pairs in it, but typically fewer on the order of a few hundred. I need to find whether a two-valued array already exists in this large data-array, eg. does [1,1] exist in the array? So the function I need should act something like this: I couldn’t get the nump…