Skip to content

Instantly share code, notes, and snippets.

View Jim-Shaddix's full-sized avatar
🙂
Working

James Russell Shaddix Jim-Shaddix

🙂
Working
View GitHub Profile
@Jim-Shaddix
Jim-Shaddix / python_selenium_getting_started.py
Last active March 31, 2022 21:58
Basic getting started kit for using selenium with python. YEP, it's that easy. [description](https://towardsdatascience.com/how-to-parse-data-using-python-and-selenium-907a95239ee0)
from selenium import webdriver
WEB_DRIVER_PATH = "/opt/homebrew/bin/chromedriver"
driver = webdriver.Chrome(WEB_DRIVER_PATH)
driver.get("https://jshaddix.com")
print(driver.title)
@Jim-Shaddix
Jim-Shaddix / WebClientConfig.java
Created March 25, 2022 23:22
Spring Web Client configuration for fetching html. Here I am setting custom properties so that the webclient is able to recieve largver payload sizes. This is needed if you are planning on recieving web resources (suchs as html) from a webclient request.
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.ExchangeStrategies;
import org.springframework.web.reactive.function.client.WebClient;
@Configuration
public class WebClientConfig {
/**
* This custom webclient configuration is needed