-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbms_reviews.py
34 lines (26 loc) · 992 Bytes
/
bms_reviews.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 4 20:30:43 2017
@author: Piyush
"""
import time
#from bms_now_showing import all_movies_name, event_codes, site, movies_names
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver_path = "F:\BMS_movies_data_extracter\chromedriver_win32\chromedriver.exe"
movie = 'Baadshaho'
event_code = 'ET00035720'
region = 'noida'
site = "https://in.bookmyshow.com/" + region + "/movies/" + movie + '/' + event_code + '/user-reviews'
browser = webdriver.Chrome(driver_path)
browser.get(site)
time.sleep(1)
user_review_tab = browser.find_element_by_xpath('//*[@id="user-review"]')
user_review_tab.click()
a=1
while a:
# Find the first element on the page, so we can scroll down using the
# element object's send_keys() method
user_review_tab = browser.find_element_by_xpath('//*[@id="user-review"]')
user_review_tab.send_keys(Keys.PAGE_DOWN)
a-=1