A
A
Artyom Innokentiev2015-09-18 13:07:19
Django
Artyom Innokentiev, 2015-09-18 13:07:19

How to parse what the browser shows (not the source of the site)?

Site source snippet:

<select>
    <option>1</option>
</select>

Code via inspector in Mozilla:
<select>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
</select>

When viewed through a browser, new options are added via JS. My parser is parsing the source, how do I parse the version shown by the browser? For certain, it is necessary to emulate the user or the browser? Send headers?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
un1t, 2015-09-18
@artinnok

selenium-python.readthedocs.org/en/latest/getting-...

A
Andrey, 2015-09-18
@andreypaa

here for scrapy there is a link https://github.com/scrapinghub/scrapy-splash that downloads the code, passes it through js execution and only then sends it for disassembly, just your case, relatively speaking, emulates a web browser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question