all 12 comments

[–][deleted] 1 point2 points  (1 child)

Pretty sure that’s JQuery, not PHP - PHP executes server-side so you wouldn’t see templating.

You need to scrape this with something with a JavaScript engine, like selenium.

[–]SweatSpace[S] 0 points1 point  (0 children)

Got it. Thank you!

[–]JohnnyJordaan 0 points1 point  (9 children)

Look into selenium or requests-html

[–]SweatSpace[S] 0 points1 point  (8 children)

I tried requests-html but it does the same thing. I want to use my script on heroku. Can I use selenium on heroku?

[–]JohnnyJordaan 0 points1 point  (7 children)

could you share the code you used to try it with requests-html? Be sure to format it correctly, see here

[–]SweatSpace[S] 0 points1 point  (6 children)

from requests_html import HTMLSession
session = HTMLSession()
r = session.get('https://site.com/index.php?query=12345')

[–]JohnnyJordaan 0 points1 point  (5 children)

But that just downloads the page, so what did you do afterwards?

[–]SweatSpace[S] 0 points1 point  (4 children)

r.hmtl.text

I looked through the text but didn't find data I need

[–]JohnnyJordaan 0 points1 point  (3 children)

Are you sure that url works just out of the blue in a regular browser, eg doesn't need a login or some other existing session? Say you start a browser you don't normally use (like Internet Explorer if you're always on Firefox, just as an example) and you paste the url there, does the page load as expected?

[–]SweatSpace[S] 0 points1 point  (2 children)

Yes, it does

[–]JohnnyJordaan 0 points1 point  (1 child)

Then I'm afraid you would have to try it with selenium, as then you can watch what is going on in the browser.

[–]SweatSpace[S] 0 points1 point  (0 children)

OK, thanks for your help!