module TinderAuthFetcher
Constants
- URI
Public Class Methods
fetch_token(email, password)
click to toggle source
# File lib/tinder_auth_fetcher.rb, line 7 def self.fetch_token(email, password) options = Selenium::WebDriver::Chrome::Options.new( prefs: { 'profile.default_content_setting_values.notifications': 2 } ) driver = Selenium::WebDriver.for :chrome, options: options driver.navigate.to URI driver.find_element(:id, 'email').send_keys(email) driver.find_element(:id, 'pass').send_keys(password) driver.find_element(:id, 'loginbutton').click driver.find_element(:name, '__CONFIRM__').click driver.page_source.match(/access_token=(\w+)&data_access_expiration_time=/)[1] end