Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # AttributeError: 'NoneType' object has no attribute 'get_text'
- restaurant_address = yelp_containers[yelp_container].find("address", {
- "class": 'lemon--address__373c0__2sPac'
- }).get_text()
- print("restaurant_address: ", restaurant_address)
- # TypeError: 'NoneType' object is not subscriptable
- restaurant_starCount = yelp_containers[yelp_container].find("div", {
- "class": "lemon--div__373c0__1mboc i-stars__373c0__30xVZ i-stars--regular-4__373c0__2R5IO border-color--default__373c0__2oFDT overflow--hidden__373c0__8Jq2I"
- })['aria-label']
- print("restaurant_starCount: ", restaurant_starCount)
- # AttributeError: 'NoneType' object has no attribute 'text'
- restaurant_district = yelp_containers[yelp_container].find("div", {
- "class": "lemon--div__373c0__1mboc display--inline-block__373c0__25zhW border-color--default__373c0__2xHhl"
- }).text
- print("restaurant_district: ", restaurant_district)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement