Skip to content

Instantly share code, notes, and snippets.

@Komzpa
Created April 28, 2019 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Komzpa/885b05b0854818098def964a46f573cb to your computer and use it in GitHub Desktop.
Save Komzpa/885b05b0854818098def964a46f573cb to your computer and use it in GitHub Desktop.
create or replace function http_get(url text)
returns text
as $$
import urllib.request
return urllib.request.urlopen(url).read().decode('utf-8')
$$
language plpython3u
parallel safe
cost 10000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment