I need a simple script that will go to specific url's, find specific word and save the sentence to .txt.
Instant payment with your preferred method! can be done in selenium if you prefer, no problem with that
import requests
from bs4 import BeautifulSoup
urls = ['URL1',
'URL2',
'URL3']
words_to_find = ['WORD1', 'WORD2', 'WORD3']
with open('results.txt', 'w') as f:
for url in urls:
r = requests.get(url)
html_content = r.text
soup = BeautifulSoup(html_content, 'html.parser')
paragraphs = soup.find_all('p')
for p in paragraphs:
for word in words_to_find:
if word in p.text:
f.write(p.text)
break
I can get your simple code done. Please reach me out at my telegram: @happyguy36I need a simple script that will go to specific url's, find specific word and save the sentence to .txt.
Instant payment with your preferred method! can be done in selenium if you prefer, no problem with that
Engage with the seller on the forum before you buy - it's the only way to be eligible for Dispute Resolution if something goes wrong.