What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-12 01:43:03
urllib urlretrieve python 3
try: from urllib.request import Request, urlopen # Python 3 except ImportError: from urllib2 import Request, urlopen # Python 2 req = Request('http://api.company.com/items/details?country=US&language=en') req.add_header('apikey', 'xxx') con... Add solution -
Other 2021-09-10 22:34:02
get unadjusted stock data
from datetime import datetime import json from urllib.parse import urlencode from urllib.request import urlopen def gethistory(symbol, start=None, end=None): # Return 3 tuples (quotes, dividends and splits) with data from start # to end datetimes ... Add solution -
Python 2021-09-09 16:03:01
Following Links in Python
import urllib from BeautifulSoup import * URL = raw_input("Enter the URL:") #Enter main URL link_line = int(raw_input("Enter position:")) - 1 #The position of link relative to first link count = int(raw_input("Enter count:")... Add solution -
Python 2021-09-07 15:32:01
download pdf from link using python
import urllib.request pdf_path = "" def download_file(download_url, filename): response = urllib.request.urlopen(download_url) file = open(filename + ".pdf", 'wb') file.write(response.read()) file.close() download... Add solution -
Javascript 2021-09-01 07:42:02
get all youtube playlist videos as json without api python
import urllib, json author = 'Youtube_Username' foundAll = False ind = 1 videos = [] while not foundAll: inp = urllib.urlopen(r'http://gdata.youtube.com/feeds/api/videos?start-index={0}&max-results=50&alt=json&orderby=published&author... Add solution