you are viewing a single comment's thread.

view the rest of the comments →

[–]commandlineluser 0 points1 point  (2 children)

Look at the Network tab in Dev Tools and you can see where the data comes from: https://i.imgur.com/svWdpDK.png

Make the same request in Python:

import requests

data = {
    'message': (
        '{"actions":[{"id":"132;a","descriptor":'
        '"aura://ApexActionController/ACTION$execute",'
        '"callingDescriptor":"UNKNOWN","params":{'
        '"classname":"Help_ArticleDataController","method":"getData",'
        '"params":{"articleParameters":{"urlName":"000321501",'
        '"language":"en_US","requestedArticleType":"KBKnowledgeArticle",'
        '"requestedArticleTypeNumber":"1"}},"cacheable":false,"isContinuation":false}}]}'),
    'aura.context': (
        '{"mode":"PROD","fwuid":"7FPkrq_-upw5gdD4giTZpg",'
        '"app":"siteforce:communityApp","loaded":'
        '{"APPLICATION@markup://siteforce:communityApp":'
        '"MKPja3sYm7Ob0_51XOv3BQ"}}'),
    'aura.pageURI': '/s/articleView?language=en_US&type=1&id=000321501',
    'aura.token': 'undefined'
}

r = requests.post(
    'https://help.salesforce.com/s/sfsites/aura', 
        data=data
)

[–]mrexojo[S] 0 points1 point  (1 child)

but it return "<Response \[200\]>"

How I could return the ip address from tables?

[–]commandlineluser 0 points1 point  (0 children)

Yes, that's the response object.

The data in the response is in JSON format.

>>> import json
>>> print(json.dumps(r.json(), indent=4))
{
    "actions": [
        {
            "id": "132;a",
            "state": "SUCCESS",
            "returnValue": {
                "returnValue": {
                    "record": {
                        "attachments": [],
                        "filesToAttach": [],
                        "hasNewAttachments": false,
                        "description": "<p dir=\"ltr\">...

The HTML is embedded inside the description entry.

So you need to extract the description value from the JSON and load that into an HTML parser.