Skip to content

Tag: python

How to scroll down in side menu

I am new to selenium python, how to scroll down to the bottom of the filter in swiggy. When I tried the background page is getting scroll instead of filter. enter image description here Answer First you have to be sure to target the correct element, in this case the side menu, then with javascript you can edi…

How to find and calculate common letters between words in pandas

I have a dataset with some words in it and I want to compare 2 columns and count common letters between them. For e.g I have: And I want to have smth like that: Answer You can use a list comprehension with help of itertools.takewhile: output: NB. the logic was no fully clear, so here this stops as soon as

Selenium cannot click button because there is a div overlay

I am trying to scrap this webpage https://www.tecnocasa.es/venta/piso/barcelona/barcelona/510567.html, the code i use is the following, and i think is correct: The buttons are found but when i try to click one i have the error <button class=”btn-default”> is not clickable at point (1138,829)…

Python List to Dictionary from a file

I have a file of notes that im trying to convert to a dictionary. I got the script working but failed to output the data im looking for when there are repeated values. In short took the file commands or comments which are separated by # as per below. I take that list and seperate the 1st column “key&#82…