### Code Style

There are multiple [PEP8 code style][1] violations, some of them are:

 * naming - use `lower_case_with_underscores` naming style
 * [spaces around operators][2]
 * [blank lines between imports and functions][3]

You should also improve your variable naming - for example, `d`, `b`, `i` are not meaningful - think of more descriptive names - remember: **Code is much more often read than written**.

### HTML-parsing and Web-scraping 

 * instantiate [`requests.Session()`][4] and reuse to make requests - this would give you a performance boost "for free":

 > if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase 
 * you can replace `.find_all()` calls with more explicit and robust [`select()` calls and use CSS selectors][5]. For instance, `soup.find_all("h1", "branded-page-header-title")` would become `soup.select("h1.branded-page-header-title")`

### Other 

 * use [`with` context manager][6] when dealing with file-like objects
 * either remove the unused `csv` import or use it to write the results into CSV files
 * convert comments before the functions into *proper docstrings*


  [1]: https://www.python.org/dev/peps/pep-0008/
  [2]: https://www.python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statements
  [3]: https://www.python.org/dev/peps/pep-0008/#blank-lines
  [4]: http://docs.python-requests.org/en/master/user/advanced/#session-objects
  [5]: https://www.crummy.com/software/BeautifulSoup/bs4/doc/#css-selectors
  [6]: https://docs.python.org/3/reference/compound_stmts.html#with