Skip to content

Instantly share code, notes, and snippets.

url = 'https://datatables.net/examples/styling/stripe.html'
response = requests.get(url)
print(response.status_code)
import requests
from bs4 import BeautifulSoup
install.packages("rvest")
install.packages("dplyr")
library("rvest")
library("dplyr")
response = read_html("http://api.scraperapi.com?api_key=51e43be283e4db2a5afb62660xxxxxxx&url=https://datatables.net/examples/basic_init/multiple_tables.html")
tables = response %>% html_table()
table_one = tables[[1]]
write_xlsx(table_one,"./html_table.csv")
table_one = tables[[1]]
tables = response %>% html_table()
response = read_html("http://api.scraperapi.com?api_key=51e43be283e4db2a5afb62660xxxxxxx&url=https://datatables.net/examples/basic_init/multiple_tables.html")
http://api.scraperapi.com?api_key={YOUR_API-KEY}&url={TARGET_URL}
install.packages("rvest")
install.packages("dplyr")
url = 'http://api.scraperapi.com?api_key=51e43be283e4db2a5afb62660xxxxxxx&url=https://datatables.net/examples/ajax/data/arrays.txt?_=1656247207356'