scraper.py file creation logic is incorrect
bryanfoley opened this issue · 2 comments
bryanfoley commented
Ran the code today from a clean dir (no previous data) and the code complained that there was no input file. Copied an old file and passed in the -u flag to update, but the new data is not being appended to the old file.
bryanfoley commented
Root cause of the bug found. The check on the value of the update variable was checking for a string of value 'True' instead of a boolean of value True. The cahnge has been made in the module 'scraper', class 'dataScraper', member function 'scrape':
def scrape(self):
if self.update==True: #Instead of =='True'
self.update_data()
self.load_data()
else:
self.load_data()
return self.tweets
bryanfoley commented
Fix pushed to master. Closing the issue.