Hi ritik!! Tks for posting this code, it's been very helpfull to learn how to scrape.
Once i run your code I got all NaNs on the Location column. I saw you had that line commented in the code.
Once i un-commented it, it gave me an error.
Thing is I found out the CSS class name was wrong, that was why the error kept coming.
The right one is: "listing-search-item__sub-title'" (yes, with the final: ')
The whole line is:
location = list.find('div', class_="listing-search-item__sub-title'").text.replace('\n', '')
That's it, it worked perfectly. Thanks for posting this code, they've been really helpfull.
Hi ritik!! Tks for posting this code, it's been very helpfull to learn how to scrape.
Once i run your code I got all NaNs on the Location column. I saw you had that line commented in the code.
Once i un-commented it, it gave me an error.
Thing is I found out the CSS class name was wrong, that was why the error kept coming.
The right one is: "listing-search-item__sub-title'" (yes, with the final: ')
The whole line is:
location = list.find('div', class_="listing-search-item__sub-title'").text.replace('\n', '')
That's it, it worked perfectly. Thanks for posting this code, they've been really helpfull.