def get_truecaller_user_data(phone_number: str):
    driver = setup_driver()
    start_view = StartView(driver)
    start_view.get_started_button.click()
    start_view.allow_permissions()
    if start_view.number_button.is_visible():
        start_view.number_button.click()
    start_view.agree_button.click()
    create_profile_view = CreateProfileView(driver)
    create_profile_view.fill_profile()
    calls_view = CallsView(driver)
    calls_view.truecaller_logo.click()
    search_view = SearchView(driver)
    search_view.search_input.set_value(phone_number)
    info_view = search_view.click_first_result()
    user_data = info_view.get_user_data()
    with open('output/user_data.json', 'w', encoding='utf-8') as f:
        json.dump(user_data, f, indent=4)
    driver.quit()
예제 #2
0
class SearchController(BaseController):
    def __init__(self, router, payload):
        super().__init__(router, payload)

        self.__view = SearchView(self)
        self.__view.render(payload)

    '''
		Handle the user's choice and redirect
		them to the appropriate view.
		
		@param choice {int} Number corresponding to
		the view in the ordered list menu.
		@param meta {Any} The meta value associated
		with the choice.
	'''

    def on_choice_selection(self, choice, meta):
        if choice == 1:
            self.go_back()
        elif choice == 2:
            self.dispatch(SEARCH_SELECT_TERM_ROUTE, self.get_payload())
        elif choice == 3:
            self.dispatch(SEARCH_SELECT_NAME_ROUTE, self.get_payload())
예제 #3
0
파일: urls.py 프로젝트: emresavas/iku-hotel
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from django.conf.urls import patterns, url, include
from django.views.generic import ListView
from django.views.generic import DetailView
from models import Hotel
from models import City
from models import Room
from views import SearchView
from views import HotelView


urlpatterns = patterns('',
    url(r'^$', HotelView.as_view(), name='hotel_list'),
    url(r'^(?P<pk>\d+)/$', DetailView.as_view(model=Hotel,)),
    url(r'^(?P<hotel>\d+)/room/(?P<pk>\d+)/$', DetailView.as_view(model=Room,)),
    url(r'^search/$', SearchView.as_view(), name='hotel_search'),
)
예제 #4
0
# coding=utf-8
from __future__ import unicode_literals, print_function

from django.conf.urls import url

from views import SearchView


urlpatterns = [
    url(r'^$', SearchView.as_view(), name='search'),
]
예제 #5
0
# coding=utf-8
from __future__ import unicode_literals, print_function

from django.conf.urls import url

from views import SearchView

urlpatterns = [
    url(r'^$', SearchView.as_view(), name='search'),
]
예제 #6
0
from django.conf.urls import url
from views import SearchView, RangeSearchView, ImpSearchView, SentimentSearchView

urlpatterns = [
    url(r'^search/', SearchView.as_view()),
    url(r'^rangeSearch/', RangeSearchView.as_view()),
    url(r'^impSearch/', ImpSearchView.as_view()),
    url(r'^sentiSearch/', SentimentSearchView.as_view())
]
예제 #7
0
# -*- coding: utf-8 -*-
#
#  url.py
#  cloud
#
#  Created by Daniel Vasquez C. on 2013-05-21.
#  Url dispatcher for files app
#

from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from views import SearchView, list

urlpatterns = patterns(
    '',
    url(r'^$', SearchView.as_view(), name='files'),
    url(r'^upload/$', 'filebrowser.views.list', name='upload'),
)
예제 #8
0
파일: urls.py 프로젝트: MakerBar/inventory
from django.conf.urls import url

from views import (SearchView,
                   SuggestionsView,
                   ItemCreateView,
                   ItemRetrieveView,
                   ItemUpdateView,
                   ItemDeleteView)

urlpatterns = [
    url(r'^$',
        SearchView.as_view(),
        name='search'),

    url(r'^item/suggestions/$',
        SuggestionsView.as_view(),
        name='suggestions'),

    url(r'^item/create/$',
        ItemCreateView.as_view(),
        name='item-create'),

    url(r'^item/(?P<pk>\d+)/$',
        ItemRetrieveView.as_view(),
        name='item-retrieve'),

    url(r'^item/update/(?P<pk>\d+)/$',
        ItemUpdateView.as_view(),
        name='item-update'),

    url(r'^item/delete/(?P<pk>\d+)/$',
예제 #9
0
파일: urls.py 프로젝트: trolltartar/nomnom
from django.conf.urls import url
from views import SearchView, FilterView, SearchMenuView, PaoBhajiView
from rest_framework.urlpatterns import format_suffix_patterns

urlpatterns = [
    url('search/', SearchView.as_view()),
    url('search_menu/', SearchMenuView.as_view()),
    url('filters/', FilterView.as_view()),
    url('paobhaji/', PaoBhajiView.as_view()),
]

urlpatterns = format_suffix_patterns(urlpatterns)
예제 #10
0
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import TemplateView, RedirectView
from views import MovieListView, TVShowListView, SearchView, DownloadListView, DownloadView, DownloadItemsView, NowPlayingView, MediaControlView, UpgradeView

urlpatterns = patterns('',
    url(r'^movies/$', MovieListView.as_view(), name='movies'),
    url(r'^tvshows/$', TVShowListView.as_view(), name='tvshows'),
    url(r'^search/$', SearchView.as_view(), name='search'),
    url(r'^search/results/$', SearchView.as_view(), name='search-results'),
    url(r'^downloads/$', DownloadListView.as_view(), name='downloads'),
    url(r'^downloads/add/$', DownloadView.as_view(), name='download-add'),
    url(r'^downloads/list/$', DownloadItemsView.as_view(), name='download-items'),
    url(r'^media/control/$', csrf_exempt(MediaControlView.as_view()), name='media-control'),
    url(r'^media/nowplaying/$', NowPlayingView.as_view(), name='nowplaying'),
    url(r'^upgrade/$', UpgradeView.as_view(), name='upgrade'),
)
예제 #11
0
파일: urls.py 프로젝트: SIMRAN1/BytePad
from django.conf.urls import url

from views import PaperListAPIView, LastUpdateAPIView, HomeView, SearchView

urlpatterns = [
    url(r'^api/list/$', PaperListAPIView.as_view(), name='list-papers'),
    url(r'^api/last-update/$', LastUpdateAPIView.as_view(), name='last-update'),
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^search/(?P<query>[\w\-]+)/$', SearchView.as_view(), name='search'),
]
# -*- coding: utf-8 -*-
# 
#  url.py
#  cloud
#  
#  Created by Daniel Vasquez C. on 2013-05-21.
#  Url dispatcher for files app
# 

from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from views import SearchView, list


urlpatterns = patterns('',
   url(r'^$', SearchView.as_view(), name='files'),
   url(r'^upload/$', 'filebrowser.views.list', name='upload' ), 
)
예제 #13
0
    def __init__(self, router, payload):
        super().__init__(router, payload)

        self.__view = SearchView(self)
        self.__view.render(payload)
예제 #14
0
파일: urls.py 프로젝트: vasa-chi/ohtahthr
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic.base import TemplateView
from interviews.urls import urls as interviews_urls
from vacancies.urls import urls as vacancies_urls
from comments.urls import urls as comments_urls
from rating.urls import urls as rating_urls
from tags.urls import urls as tags_urls
from feedback.urls import urls as feeback_urls
from views import SearchView
admin.autodiscover()

urlpatterns = patterns("",

    url(r"^admin/", include(admin.site.urls)),
    #url('', include('social.apps.django_app.urls', namespace='social'))
    url(r"^$", name="index", view=TemplateView.as_view(template_name="base.html")),
    url(r"^search/$", name="search", view=SearchView.as_view())
)
urlpatterns += interviews_urls
urlpatterns += vacancies_urls
urlpatterns += comments_urls
urlpatterns += rating_urls
urlpatterns += tags_urls
urlpatterns += feeback_urls
예제 #15
0
# -*- coding: utf-8 -*-

from django.conf.urls import patterns, url

from views import home, SearchView, LocationDetailView, LocationTypeListView, LocationTypeDetailView, NavigateView

urlpatterns = patterns(
    '',
    url(r'^$', home, name='mobile_home'),
    url(r'^search/$', SearchView.as_view(), name='mobile_search'),
    url(r'^type/$', LocationTypeListView.as_view(), name='mobile-type'),
    url(r'^type/(?P<pk>\d+)/$',
        LocationTypeDetailView.as_view(),
        name='mobile-type-detail'),
    url(r'^location/(?P<slug>[-\w]+)/$',
        LocationDetailView.as_view(),
        name='mobile-location-detail'),
    url(r'^(?P<path>[0-9A-Za-z-_.//]+)/$',
        NavigateView.as_view(),
        name='mobile-navigate'),
)
예제 #16
0
파일: urls.py 프로젝트: dairdr/vote
# -*- encoding: utf-8 -*-
"""Defines all urls conf."""
from django.conf.urls import patterns, url
from django.contrib.auth.views import login, logout
from views import SearchView

urlpatterns = patterns('',
	url(r'^login/$', login, { 'template_name':'login/login.html' }, name='login-index'),
	url(r'^logout/$', logout, { 'template_name':'login/logout.html' }, name='logout-index'),
	url(r'^search/$', SearchView.as_view(), name='login-search'),
)
예제 #17
0
from django.conf.urls.defaults import patterns, url
from django.views.generic.base import TemplateView
from views import SearchView, ItemView


urlpatterns = patterns('',
    url(r'^$', SearchView.as_view(), name='index'),
    url(r'^search/$', SearchView.as_view(), name='search'),
    url(r'^(?P<item_path>.*)/$', ItemView.as_view(), name='item'),
)
예제 #18
0
from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from views import SearchView, QueueView, SettingsView, RegistrationView, TorrentPageView, torrent_form_middleman
from api.utils import create_torrent_record, delete_torrent_record, retrieve_queue, register_client,\
    reset_client_id
from authentication.views import LoginView, logout_view
admin.autodiscover()

urlpatterns = patterns('tpb_mobile.views',
    # Examples:
    url(r'^$', SearchView.as_view(), name='home'),
    url(r'^queue/$', QueueView.as_view(), name='queue'),
    url(r'^settings/$', SettingsView.as_view(), name='settings'),
    url(r'^register/$', RegistrationView.as_view(), name='register'),
#     url(r'^torrent/(?P<created>(.)*)/(?P<user>(.)*)/(?P<seeders>(\d)*)/(?P<leechers>(\d)*)/(?P<url>(.)*)/$', TorrentPageView.as_view(), name='torrent'),
    url(r'^torrent/$', TorrentPageView.as_view(), name='torrent'),
    url(r'^middleman/$', torrent_form_middleman, name='middleman'),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)

urlpatterns += patterns('api.utils',
    url(r'^api/create_torrent/$', create_torrent_record, name='create_torrent'),
    url(r'^api/delete_torrent/$', delete_torrent_record, name='delete_torrent'),
    url(r'^api/retrieve_queue/$', retrieve_queue, name='retrieve_queue'),
    url(r'^api/register_client/$', register_client, name='register_client'),
    url(r'^api/reset_client_id/$', reset_client_id, name='reset_client_id')
)
예제 #19
0
# -*- coding: utf-8 -*-

from django.conf.urls import patterns, url

from views import home, SearchView, LocationDetailView, LocationTypeListView, LocationTypeDetailView, NavigateView


urlpatterns = patterns(
    "",
    url(r"^$", home, name="mobile_home"),
    url(r"^search/$", SearchView.as_view(), name="mobile_search"),
    url(r"^type/$", LocationTypeListView.as_view(), name="mobile-type"),
    url(r"^type/(?P<pk>\d+)/$", LocationTypeDetailView.as_view(), name="mobile-type-detail"),
    url(r"^location/(?P<slug>[-\w]+)/$", LocationDetailView.as_view(), name="mobile-location-detail"),
    url(r"^(?P<path>[0-9A-Za-z-_.//]+)/$", NavigateView.as_view(), name="mobile-navigate"),
)