Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get error when call "get()" method #17

Open
dangdangkhtn opened this issue Sep 4, 2016 · 1 comment
Open

Get error when call "get()" method #17

dangdangkhtn opened this issue Sep 4, 2016 · 1 comment

Comments

@dangdangkhtn
Copy link

My code:
from pytractor import webdriver
driver = webdriver.Firefox()
driver.get('http://gratisal.matcao.vn/')

I got this error:
File "C:\Python27\lib\site-packages\pytractor\mixins.py", line 221, in get
' {}'.format(full_url, message)
pytractor.exceptions.AngularNotFoundException: Message: Angular could not be found on page: http://gratisal.matcao.vn/: retries looking for angular exceeded

The page i try to get into driver is an angular 1.5 app, Is there something i don't know to get the webdriver work

@0xIslamTaha
Copy link

0xIslamTaha commented Feb 2, 2017

This error mean that your required page doesn't have an angular engine in it. Pytractor is looking for 'ng-app' to be in the page.

To be able to load a page that doesn't have this engine, use the following method instead of the original get one:

    def get_page(self, page_url):
        try:
            self.driver.ignore_synchronization = False
            self.driver.get(page_url)
        except AngularNotFoundException:
            self.driver.ignore_synchronization = True
            self.driver.get(page_url)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants