APIs & web scraping Flashcards

1
Q

Using BeautifulSoup, how to capture all ‘a’ tags?

A

a_tag_text = soup.find_all(‘a’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Using BeautifulSoup, how to get the link URL out of captured ‘a’ tag text?

A

a_tag_text.get(‘href’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Using BeautifulSoup, how to get the link TEXT out of captured ‘a’ tag text?

A

a_tag_text.text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly