Skip to main content

All Questions

Tagged with
1 vote
1 answer
32 views

Beautiful Soup ".find" not working running from windows terminal

i'm trying to automate a program to scrap periodically some prices from amazon and other pages. (I'm starting with amazon) The problem is when i do the soup.find method with PyCharm, it finds his ...
Oscar Tarrago's user avatar
-1 votes
3 answers
111 views

Multiple substrings in string python within variable check [duplicate]

I have the following code: check = "red" in string_to_explore How can I replicate it for multiple substrings? I tried with: check = "red|blue" in string_to_explore but doesn't ...
iraciv94's user avatar
  • 820
1 vote
1 answer
51 views

Find matrix rows with common elements

Good morning everybody, first time for me here as Python beginner. I have to solve the following problem: given a matrix as the one below, I need to find which rows have some nonzero elements in ...
Ludovica Spada Chiodo's user avatar
1 vote
1 answer
359 views

Find, Replace and adjust image in PDF's using python

I have code in python which is finding and replacing a image in pdfs, but I'm having hard time adjusting the size of the new image so what the code is doing is finding the old image and it's using the ...
Shwapx's user avatar
  • 41
0 votes
1 answer
23 views

Python globbing to match find's "-print -quit" behavior

I have a few arbitrarily deep directories, each of which contains a single file with a consistent name. In the command line I can use find <dir> -name <filename> -print -quit for optimized ...
Yehuda's user avatar
  • 1,893
-6 votes
3 answers
108 views

Searching a list by an undefined value [duplicate]

There is a certain list that I get after parsing a certain html page: Could you tell me please, how can I do a search for a specific value? Let's say I specify only part of the value KES_ and the ...
Alex Rebell's user avatar
-3 votes
5 answers
317 views

how can I find the position of the last LETTER in a string in python?

I want to include a function in my code that can return the position in the string that the last letter in the string can be found. e.g: if the input were " hello world k ...^&", the ...
Coding Pigeon's user avatar
-2 votes
1 answer
49 views

python finding indexes of strings does not work

I have a list of filenames and a filename. Now I want to get the index. I can check that an entry exists, does that match only for identical entries? count = tfilename.count(filename) if count > 0: ...
Matthias Pospiech's user avatar
-1 votes
1 answer
88 views

why does the slices read only the first and last line , skipping the line between them

I can't correctly capture (read) the text received from the user why is the data from the fill-in form not being read correctly? thank you in advance I can 't understand the reason , where did I make ...
Claus's user avatar
  • 13
0 votes
2 answers
73 views

Unexpected results from Pyhton find() function

I have this string string = "DLR1=A,B,C,D,E,F,G|DLR2=A,B,C,D,E,F,G|DLR=A,B,C,D,E,F,G|" And I want to find the indexes of DLR, DLR1 and DLR2. However, when I use the Python find() function I ...
Francesco Gregotti's user avatar
0 votes
1 answer
39 views

Issue with python's string find method returning -1

I'm trying to write a function that takes a string and returns the token positions. The function works fine when tokens = query_string.split() but if I try to use the string lower method, as shown in ...
Helpme's user avatar
  • 21
0 votes
0 answers
30 views

Where is this file in Windows? /home/f515c326-589b-4129-8fbc-af1053ae8b58/deneme.txt

dosya = open(“deneme.txt”, “w”) print(“Ben Python, Monty Python!”, file=dosya) dosya.close() After import os os.getcwd() the result /home/f515c326-589b-4129-8fbc-af1053ae8b58/deneme.txt this is ...
Mertua's user avatar
  • 1
-1 votes
2 answers
43 views

Print the Immediate Left Character of the Text Searched in a Text File Using Python

As I am running a program where I want to replace the searched text with my replacement text. However, at the first instance it does the great work but on running the next instance it is not ...
Arun Pandey's user avatar
0 votes
0 answers
23 views

Selenium find.by

Good day. I am starting to learn Selenium and I am a beginner. I have this problem: I need to select all head-to-head matches (for example, Djokovic-Alcaraz 2:1...) from the entire Tipsport site. ...
user22516966's user avatar
1 vote
1 answer
147 views

Python Scraping Problem with Beautifulsoup on Zara

I'm trying to webscrape Zara with this code(below), in the result I want to get the price of the product but I cant and I get the answer "[ ]". What should I do ? Thanks in advance. from bs4 ...
Erdem Kabadayı's user avatar

15 30 50 per page
1
2 3 4 5
55