Przeglądaj źródła

add fast-selenium api to reply facebook and scrape yelp reviews

Mohidul Islam 4 lat temu
rodzic
commit
9869641c69
1 zmienionych plików z 0 dodań i 25 usunięć
  1. 0 25
      yelp/store_reviews.py

+ 0 - 25
yelp/store_reviews.py

@@ -1,25 +0,0 @@
-import requests
-from django.conf import settings
-from .scrapper import scrape_reviews
-from .utils import get_max_date, store_into_database
-from .models import YelpLocation
-
-BROWSER_URI = getattr(settings, 'BROWSER_URI')
-
-
-def store_yelp_reviews(location, n_pages):
-    location_url = location.url
-    max_date = get_max_date(location)
-    reviews = scrape_reviews(
-        location_url=location_url,
-        max_date=max_date,
-        n_pages=n_pages
-    )
-    if reviews:
-        store_into_database(reviews, location)
-
-
-def populate_reviews():
-    locations = YelpLocation.objects.all()
-    for yl in locations:
-        store_yelp_reviews(yl, 1)