I have a website where I’d like to get all the images from the website. The website is kind of a dynamic in nature, I tried using google’s Agenty Chrome extension and followed the steps: I Choose one image that I want to extract using CSS selector, this will make the extension select the same othe…
Need help to make while loop restart my Python program from top
I would like to get help with this program I have made. The function of the code is so the users can input a city anywhere in the world and they will then get data about the weather for that city. I want it to restart the program from the top, but it only restarts the program from where the
What does a star (asterisk) do in f-string?
In the python document 2.4.3. Formatted string literals, it seems possible to write a star followed by an expression in a f-string’s {}, but I cannot find how to use that. What’s that and how I can use it? Is it documented somewhere? To be exact, this is regarding “*” or_expr part of t…
Python & BS4 – Strange behaviour, scraper freezes/stops working after a while without an error
I’m trying to scrape eastbay.com for Jordans. I have set up my scraper using BS4 and it works, but never finishes or reports an error, just freezes at some point. The strange thing is that it stops at some point and pressing CTRL+C in the Python console (where it’s outputting the prints as it̵…
Write to any users desktop in Python
Im new to Python so apologies if this is a basic question. I have successfully created an exe file that writes to my specific desktop directory, but I am struggling to find a way to write to any users desktop directory. The idea being my exe file can be copied onto any user profile and work the same. Here is
mypy error: Callable has no attribute “__get__”
I have something like the following: …for which Mypy will return this error: What is the canonical way to specify the type for func, so that Mypy understands it is a descriptor (and thus always has a __get__)? Update: it’s a bit humorous that “descriptor” has no hits when searching the…
Why doesn’t Flask app enter GET method but does enter POST methods?
I apologize, this has to be a duplicate but I haven’t found anything that’s helped, so I imagine it must be an import or syntax issue? Also, I’m on crash course levels of Python and HTML here, and it’s finals week, so bear with me. I’m working on a homework assignment that specif…
how to check if a string fullfil with multiple regex and capture that portion that match?
What I want I’m working with a django form and it takes a password input. I need to pass the input value for multiple regexes, which will test if: at least one character is a lowecase at least one character is a uppercase at least one character is a number at least one character is a especial character …
Terraform: Validation error … Member must satisfy regular expression pattern: arn:aws:iam::
I’m trying to stream rds through kinesis data stream but it is giving me this error: botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the PutRecord operation: 1 validation error detected: Value ‘arn:aws:kinesis:us-west-2:xxxxxxxxxx:stream/rds-temp-leads-stream&…
How to put random numbers in Pygame
I expected the ball to move and every time it hits the corner change velocity. Answer To make the ball move, you’ve to use a variable for position wich can store floating point coordinates. The position is changed every frame depending on the speed. Finally the ball rectangle has to be updated with the …