mostafa-hajian
mostafa-hajian

Reputation: 53

render in html_requests return none

I used render, links in python_requests return None, set()

I dont know where the problem is?

from requests_html import HTMLSession

session = HTMLSession()
r = session.get('http://saipa.iranecar.com/')
print(r.html.render())  # None

dont have any error

Upvotes: 2

Views: 2005

Answers (1)

manwithfewneeds
manwithfewneeds

Reputation: 1167

r.html.render() is done in place. Therefore it should be done outside of the print function

...
r.html.render()
print (r.content)

Upvotes: 3

Related Questions