SHARE
TWEET

Untitled

a guest Feb 12th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. url_list = df_1.responseurl.tolist()
  2.  
  3. for url in url_list:
  4.         headers = {'User-Agent':
  5.               'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
  6.     req = Request(url, headers=headers)
  7.     html = urllib.request.urlopen(req).read()
  8.     f = open (i.strip('.csv'),'a+',encoding="utf-8")
  9.     f.write(text_from_html(html))
  10.     f.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top