Di handap ieu conto file Python 3 nu bisa dipaké salaku scraper data ramatloka. conto ieu ngagunakeun pamundut jeung BeautifulSoup perpustakaan pikeun nimba eusi téks tina ramatloka mana wae. # Impor perpustakaan impor pamundut ti bs4 ngimpor BeautifulSoup # Tétéla URL ramatloka url = 'http://example.com' # Jieun pamundut GET ka URL respon = requests.get(url) # Parse respon kana HTML sup = BeautifulSoup(response.text, 'html.parser') # Extract eusi téks tina téks respon = sup.get_text(() # Print téks printtext
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence