Skip to content
Advertisement

Tag: web-scraping

webscraping an image with highlighted text

I am doing web scraping on this URL which is a newspaper image with highlighted words. My purpose is to retrieve all those highlighted words in red. Inspecting the page gives the class: image-overlay hit-rect ng-star-inserted in which attribute title must be extract: Using the following code snippet with BeautifulSoup: However, I get [] as a result! My expected result

Downloading all zip files from url

I need to download all the zip files from the url: https://www.ercot.com/mp/data-products/data-product-details?id=NP7-802-M The zip files are as shown in the pic: I am trying the following code: I have tried different versions of above but no success so far. I am not sure how to proceed. Answer Everything you need comes from one endpoint that you can query and then

Convert epoch to human-readable date python

I want to convert from epoch to date like that : 1575135888 ==> 3 years ago (https://i.stack.imgur.com/x2ZPW.png) I have this code : I got 2022-12-09 and 2019-11-30 18:44:48 I don’t know how to convert it to 3 years ago. Answer Well, you could use timedelta like this: Output: But I’m afraid that the meaning of “years ago” is ambiguous: Does

Get Text from SVG using Python Selenium

My first time trying to extract data from an SVG element, following is the SVG element and the code I have tried to put up by reading stuff on the internet, I have absolutely no clue how wrong I am and why so. I am trying to get the Categories and corresponding Percentages from the last 2 blocks of the

Advertisement