Boosted by baldur@toot.cafe ("Baldur Bjarnason"):
iris_meredith ("Iris") wrote:
RE: https://mastodon.social/@iris%5Fmeredith/116311817974687217
Resources are running low, rent needs to be paid and the relevant support systems are distinctly unhelpful, so I'm going to be pushing out more LinkedIn-relevant articles for the next little while. Apologies to those who read my work for the critical essays.






![try: rresp = requests.get(url, timeout=10) except requests.exceptions.ReadTimeout: print(f"timed out {url}, trying selenium") hdata = "{}" from selenium import webdriver driver = webdriver.Safari() driver.get(url) element = driver.find_element("xpath", "/html") outerhtml: str = element.get_attribute("outerHTML") # type:ignore[no-untyped-call] bdata = outerhtml.encode("utf-8") else: hdata = json.dumps(dict(rresp.headers)) bdata = rresp.content](https://files.mastodon.social/media_attachments/files/116/310/272/849/052/189/original/bdb6f1126ce571a5.png)

