Aug-01-2020, 04:32 PM
You can run for example the Python repl (or better IPython) with your program in interactive mode.
Open your browser, press F12 and select the html element you want to inspect.
Then you'll see the class names. Then try in the python repl to find the element.
Sometimes you get different results with requests and a real browser,
because some pages are manipulating the DOM with JavaScript.
In this case you could try: https://pypi.org/project/requests-html/
A step further is selenium, which controls a headless remote browser (Firefox, Chrome).
python3 -i your_program.pyThen the exception will appear and then you can use the
b
or bs
object.Open your browser, press F12 and select the html element you want to inspect.
Then you'll see the class names. Then try in the python repl to find the element.
Sometimes you get different results with requests and a real browser,
because some pages are manipulating the DOM with JavaScript.
In this case you could try: https://pypi.org/project/requests-html/
A step further is selenium, which controls a headless remote browser (Firefox, Chrome).
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!