"I wanted to pull the sentence ""Day of Olaf's Birth"" in the first image, so I wrote it like the second image, but I got an error because there was a hyphen in the attribute name."When I try to erase this hyphenated attribute, it says Nonetype object has no attribute 'find' and I don't know how to fix it.
Actual Screen:
Python display:
python python3 web-scraping
SyntaxError lines are resolved by enclosing 'single quotation' where you want to enter class_.
title=movedetail.find(
'span', class_='"h2ng-binding", ng-binding="$ctrl.product.Name"")
I recommend you to look into regular expressions.
However, the same error occurs even if you run it as it is.This modal-content appears after you click "See More", so there will be None in the movedetail.
BeautifulSoup is a static parsing library, so it is recommended that you use selenium sendkey for dynamic pages as mentioned above.
This may be helpful:
How to send key with BeautifulSoup
© 2024 OneMinuteCode. All rights reserved.