K
K
KZevs2016-10-13 17:16:21
Python
KZevs, 2016-10-13 17:16:21

How to get HTML code from developer console?

I don't know how to phrase the question correctly.
When I open the HTML code, via:
import urllib.request
res = urllib.request.urlopen("site").read()
print(res)
Not all the lines that are in the Elements tab in the Google Chrome developer console are displayed.
f51b5362a9be400da788b94bec4155af.png
Is there any way to get the HTML-code from Elements?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
NoMoney, 2016-10-14
@KZevs

Enter in the browser console:
document.documentElement.outerHTML

A
Alexey Cheremisin, 2016-10-13
@leahch

Все просто, дополнительные строки наверняка дописывает javascript, так что через urllib их никак не получить.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question