I wish to scrape photo links from a facebook's html code. It is given as:
<img class="_7jys img" src="https://scontent-arn2-2.xx.fbcdn.net/v/t39.16868-6/s600x600/70767091_398966137483846_5448404540279750656_n.jpg?_ncx" alt="">
I am trying to do:
url = 'https://www.facebook.com/ads/archive/render_ad/?'
response = requests.get(url, timeout=5)
content = BeautifulSoup(response.content, "html.parser")
garbage = []
for item in content.findAll('src', attrs={'class': 'img' }):
print(item)
garbage.append(item.text)
It returns an empty list. How do I access the tag?