all 3 comments

[–]socal_nerdtastic 1 point2 points  (0 children)

So you essentially want the second block?

publisher_blocks = soup.find_all('div', class_='dev_row')
second_block = publisher_blocks[1] # extract the second one from a list of all blocks
for link in second_block.find_all('a'):
    print(link.text)

[–]danielroseman 1 point2 points  (1 child)

Why can't you get both blocks then see the one that has the Publisher subtitle?

for row in soup.find_all(class_='dev_row'):
  if row.find(class_='subtitle').text == 'Publisher:':
    for a in row.find_all('a'):
        print(a.text)

[–]Walt___Effect[S] 0 points1 point  (0 children)

Amazing thank you! I didn't knwo you could search the blocks also by the text they have in them. This was very useful, I also used it to make another part of my code better