How to simulate click event for a link using Qt with python
Question: I want to screen scrape a web site having multiple pages. These pages are
loaded dynamically without changing the URL.

I dont want to use Selenium since it opens browser every time you need
content.Does QT work the same way?If not, how can i simulate click event using
qt?

PS:Google provided vague answer Thanks in advance


Answer: There's already a project that does just that:
[ghost.py](http://jeanphix.me/Ghost.py/). It uses PyQt4's or PySide's QWebkit
browser internally.

Here's their example code:

    
    
    from ghost import Ghost
    
    ghost = Ghost()
    page, extra_resources = ghost.open("http://jeanphi.fr")
    
    assert page.http_status==200 and 'jeanphix' in ghost.content
    

You will most likely be using `ghost.click()` to interact with your webpage:

    
    
    ghost.click('#selector')
    

