Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
- Remove random 's'
- Checks if tmp directory exists, if not creates it
  • Loading branch information
claffin committed Aug 2, 2020
1 parent 77ed02e commit e2d3613
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os
import uuid
import argparse
import time
Expand Down Expand Up @@ -358,7 +359,11 @@ def scrape_restaurant_listing(page_url):
print("Attractions not yet supported")
elif '/VacationRentalReview-' in url:
print("Vacation rentals not yet supported")
s

# Create tmp directory, if it doesn't exist
if not os.path.exists('tmp'):
os.makedirs('tmp')

# Writes data output to JSON file, named using a UUID
with open('./tmp/' + str(uuid.uuid1()) + '.json', 'w') as outfile:
json.dump(data, outfile, indent=4)
Expand Down

0 comments on commit e2d3613

Please sign in to comment.