by writing the below code
url=\'http://www.laughfactory.com/jokes/popular-jokes\' r=requests.get(url) tree =html.fromstring(r.content) links_sel=\'//*[@id=&