Answer the question
In order to leave comments, you need to log in
Why doesn't the find_all method in BeautifulSoup want to work?
def get_freelance_list(html):
soup = BeautifulSoup(html, "lxml")
container = soup.find('table', class_='catalog-freelancers')
frelancer = container.find_all('a', class_='freelancer-name').get('href')
frelancer_link = 'https://www.fl.ru/' + frelancer
return frelancer_link
"ResultSet object has no attribute '%s'. You're probably treating a list of items like a single item. Did you call find_all() when you meant to call find()?" % key
AttributeError: ResultSet object has no attribute 'get'. You're probably treating a list of items like a single item. Did you call find_all() when you meant to call find()?
Answer the question
In order to leave comments, you need to log in
Where can the layout "move out"? In the metadata tree of the configurator? So you added a new layout in front of it. What is the difference (other than aesthetic) in how layouts are arranged?
Or when you open a Word document, the content is not the same as it was in the original file, which was saved and thrown into the layout? After opening, you have a lot of changes to the document - by step-by-step commenting on the code, you can calculate which instruction causes the "moving out".
Regarding the binary layout. I recommend using the active document type: 1) so you won't need to save and overwrite binary data every time for changes - you can make all changes directly in the configurator; 2) when you receive the layout, immediately get a COM object ready to be populated and shown to users.
ResultSet object has no attribute 'get'. You're probably treating a list of items like a single item
get
on an object that does not have that method. You are trying to get some href
. Instead, you need to loop through the collection that returns find_all
and from each element (tag) separately get the link from the attribute href
. The normal find
one works for you because it returns one element (tag).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question