Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. # AttributeError: 'NoneType' object has no attribute 'get_text'
  2. restaurant_address = yelp_containers[yelp_container].find("address", {
  3. "class": 'lemon--address__373c0__2sPac'
  4. }).get_text()
  5. print("restaurant_address: ", restaurant_address)
  6.  
  7.  
  8.  
  9.  
  10. # TypeError: 'NoneType' object is not subscriptable
  11. restaurant_starCount = yelp_containers[yelp_container].find("div", {
  12. "class": "lemon--div__373c0__1mboc i-stars__373c0__30xVZ i-stars--regular-4__373c0__2R5IO border-color--default__373c0__2oFDT overflow--hidden__373c0__8Jq2I"
  13. })['aria-label']
  14. print("restaurant_starCount: ", restaurant_starCount)
  15.  
  16.  
  17.  
  18. # AttributeError: 'NoneType' object has no attribute 'text'
  19. restaurant_district = yelp_containers[yelp_container].find("div", {
  20. "class": "lemon--div__373c0__1mboc display--inline-block__373c0__25zhW border-color--default__373c0__2xHhl"
  21. }).text
  22. print("restaurant_district: ", restaurant_district)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement