<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can use python to manipulate selenium in JMP 18? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794823#M97154</link>
    <description>&lt;P&gt;ChatGPT&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-09-04_10-33-46.png" style="width: 700px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67875i0C4DC1ADC41D8E57/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-09-04_10-33-46.png" alt="2024-09-04_10-33-46.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know even less about python.Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
import time

# Set the path to your ChromeDriver
service = Service(executable_path="path/to/chromedriver")

# Initialize the browser
options = webdriver.ChromeOptions()
options.add_argument('--headless')  # Run in headless mode to avoid opening a browser window
browser = webdriver.Chrome(service=service, options=options)

# Visit the target webpage
browser.get("https://xvfr.com/60s.html")

# Wait for the page to load
time.sleep(5)  # Wait 5 seconds for the page to load completely; you can use WebDriverWait for better handling

# Get all network requests
logs = browser.get_log('performance')

# Parse network requests to find the image URL
for log in logs:
    if 'https://g.gtimg.cn/music/photo_new' in str(log):
        print("Found image URL:", str(log))

# Close the browser
browser.quit()&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Sep 2024 02:37:30 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2024-09-04T02:37:30Z</dc:date>
    <item>
      <title>How can use python to manipulate selenium in JMP 18?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794738#M97148</link>
      <description>&lt;P&gt;I want to automatically capture the content of the web page and get the real URL.&lt;/P&gt;&lt;P&gt;For example the&lt;/P&gt;&lt;P&gt;&lt;A href="https://xvfr.com/60s.html" target="_self"&gt;https://xvfr.com/60s.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;its essence is only a picture real website &lt;A href="https://g.gtimg.cn/music/photo_new/T053XD001001eyb6g4JwXRW.png" target="_self"&gt;https://g.gtimg.cn/music/photo_new/T053XD001001eyb6g4JwXRW.png&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no content for this image address in the page source code.But it's a different address every day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have installed the following libraries in JMP python&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jmputils.jpip('install', 'selenium')
jmputils.jpip('install', 'requests')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 00:12:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794738#M97148</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-04T00:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can use python to manipulate selenium in JMP 18?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794801#M97150</link>
      <description>&lt;P&gt;if you need to get text from a picture, that's called OCR (optical character recognition.) I've never played with it, but it looks like pytesseract might handle it; it claims to support many languages.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 02:02:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794801#M97150</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-09-04T02:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can use python to manipulate selenium in JMP 18?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794816#M97152</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;I have solved the picture OCR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-09-03_11-19-32.png" style="width: 958px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67874i1FE5DE7541EEF3BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-09-03_11-19-32.png" alt="2024-09-03_11-19-32.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The point is that the address of this picture is different every day and I don't want to get it manually.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;See Craige Expert's original blog.&lt;/SPAN&gt;&lt;SPAN class=""&gt;But it's too complicated. I don't understand.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;So I want to automatically get the real address of the picture for this website.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thank Craige!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 02:19:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794816#M97152</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-04T02:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can use python to manipulate selenium in JMP 18?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794820#M97153</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Now I want to figure out how to combine JMP 18 python to automatically get a different address of this image every day to download and recognize JSL.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 02:21:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794820#M97153</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-04T02:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can use python to manipulate selenium in JMP 18?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794823#M97154</link>
      <description>&lt;P&gt;ChatGPT&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-09-04_10-33-46.png" style="width: 700px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67875i0C4DC1ADC41D8E57/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-09-04_10-33-46.png" alt="2024-09-04_10-33-46.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know even less about python.Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
import time

# Set the path to your ChromeDriver
service = Service(executable_path="path/to/chromedriver")

# Initialize the browser
options = webdriver.ChromeOptions()
options.add_argument('--headless')  # Run in headless mode to avoid opening a browser window
browser = webdriver.Chrome(service=service, options=options)

# Visit the target webpage
browser.get("https://xvfr.com/60s.html")

# Wait for the page to load
time.sleep(5)  # Wait 5 seconds for the page to load completely; you can use WebDriverWait for better handling

# Get all network requests
logs = browser.get_log('performance')

# Parse network requests to find the image URL
for log in logs:
    if 'https://g.gtimg.cn/music/photo_new' in str(log):
        print("Found image URL:", str(log))

# Close the browser
browser.quit()&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2024 02:37:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-use-python-to-manipulate-selenium-in-JMP-18/m-p/794823#M97154</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-04T02:37:30Z</dc:date>
    </item>
  </channel>
</rss>

