Issue
i am trying to scrape yellow page by using scrapy and python getting all other result right but not getting the business name
tried changing xpath even tried css selector but not getting proper result
Solution
If you are talking about yellowpages.com then you can scrape the names of businesses from a searchresult-page by using the css selector with the following tags: 'div.info .business-name span::text'
So for example, you could start a scrapy shell and go to a search result:
scrapy shell "https://www.yellowpages.com/search?search_terms=doctors&geo_location_terms=berlin"
Then type the following into your scrapy shell:
response.css('div.info .business-name span::text').extract()
You should now receive a list of all business names of that specific page.
But watch out, yellowpages.com explicitly states in their robots.txt that scrapy is not allowed on any of their pages.
Answered By - carpa_jo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.