Closed prgr4m closed 9 years ago
Definitely use 2.7. Very strange error. Looks like the table with the results is missing. Can you modify the code to print the result of the .read() call before it's passed into the BeautifulSoup object? That will show the raw HTML being returned by the request and we can see what is different about it.
Fixed issue. Python 2.x will only be supported until 2020. Yes, that's a ways away but knowing how things progress, might I suggest writing code that works for both? Like using requests as the http client (works for both 2.x and 3.x) and handles cookies for you? Yes, urllib and urllib2 is standard (a little dated) but its just urllib in py3. I personally prefer standard libs but in this particular project and knowing how slow upgrade paths can be in gov't, it wouldn't be a bad move at all to move to requests.
From fresh check out using pyenv 2.7.8
Using pyenv 3.4.2: