I have this python code to extract the image src from an HTML website
listingid=[img['src'] for img in soup.select('[src]')]
Now would like to extract the values from the following output and store into a dictionary:
Any approach I can take to achieve this?
Im thinking if there is any syntax in python to take 14 characters before a specific suffix(like .jpg)
s[-18:-4]? Python slices can take negative indices to mean start from the end.