Skip to content

Instantly share code, notes, and snippets.

@ayancey
Created February 25, 2016 13:05
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 ayancey/a4484f1cfb2709a11824 to your computer and use it in GitHub Desktop.
Save ayancey/a4484f1cfb2709a11824 to your computer and use it in GitHub Desktop.
# actual_data = json.loads(data)
# for c in actual_data:
# if not actual_data[c]:
# print c + '--'
# r = requests.post('http://www.beertutor.com/beers/index.php?t=sub_pages&cat=' + str(c), data = {'num_results': '5000'})
# beer_ids = []
# for id in re.findall('\?id=.*', r.text):
# beer_ids.append(int(id.split('?id=')[1].split('&')[0]))
# print 'done'
# clipboard.copy(json.dumps(beer_ids))
# raw_input()
# # for cc in actual_data[c]:
# # print cc
# # #raw_input()
# # r = requests.post('http://www.beertutor.com/beers/index.php?t=sub_pages&cat=' + str(cc), data = {'num_results': '5000'})
# # beer_ids = []
# # for id in re.findall('\?id=.*', r.text):
# # beer_ids.append(int(id.split('?id=')[1].split('&')[0]))
# # #print beer_ids
# # actual_data[c][cc].extend(beer_ids)
# # print str(soup.select('td.text'))
# #print r.text
# #preview_html(r.text)
# #print actual_data
# #clipboard.copy(json.dumps(actual_data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment