0
Greetings,I made that algorithm CODE BELOW:
from bs4 import BeautifulSoup
soup=BeautifulSoup(html,'html.parser')
for link in soup.select('div.sg-actions-list__hole > a[href*="/tarefa"]'):
ref=link.get('href')
rt = ('https://brainly.com.br'+str(ref))
p.append(rt)
print(p)
for url in p:
r = requests.get(url).text
time.sleep(10)
print(r)
Basically Store the Url in a List and Then in a Loop Print the Source_code.
My Doubt and How to Transform the Variable r
in an Archive TXT
with open('file', 'w') as f: f.write(r)
– Elton Nunes