a guest Jul 23rd, 2019 118 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for i in range(1, 15):
  2.     url = '{n}'.format(n = 0)
  3.     headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
  4.     p = requests.get(url, headers=headers)
  5.     page = bs(p.text, 'html.parser')
  6.     for a in page.findAll('a', class_='Link Link_js_inited Link_size_m Link_theme_islands SerpItemLink OffersSerpItem__link'):
  7.         print(''+a.get('href'))
  8.         #ans.append(''+a.get('href'))
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