<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>IT notes - python</title>
    <subtitle>DBRE, AWS platform engineering, PostgreSQL, Linux, FreeBSD, and Rust reference notes.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://nbari.com/tags/python/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://nbari.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2023-05-21T20:10:44+00:00</updated>
    <id>https://nbari.com/tags/python/atom.xml</id>
    <entry xml:lang="en">
        <title>vim-python</title>
        <published>2023-05-21T20:10:44+00:00</published>
        <updated>2023-05-21T20:10:44+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/vim-python/"/>
        <id>https://nbari.com/vim-python/</id>
        
        <content type="html" xml:base="https://nbari.com/vim-python/">&lt;p&gt;If you get:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Warning: vim has no support for python, but it is required to run the formateter !&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Update/Install python with &lt;code&gt;pyenv&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pyenv install 3.11.3&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Clone the Vim repository:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-12&quot;&gt;git&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt; clone https://github.com/vim/vim.git&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Configure with python support:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;./configure --with-features=huge --enable-multibyte --enable-python3interp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Build and install:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;make &amp;amp;&amp;amp; sudo make install&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Test running from vim:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;:echo has(&amp;#39;python3&amp;#39;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;pytuple-type&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#pytuple-type&quot; aria-label=&quot;Anchor link for: pytuple-type&quot;&gt;🔗&lt;/a&gt;PyTuple_Type&lt;/h2&gt;
&lt;p&gt;If get an error about &lt;code&gt;PyTuple_Type&lt;/code&gt;,  use the system python (not &lt;code&gt;pyenv&lt;/code&gt;)&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>pip upgrade</title>
        <published>2021-05-05T07:55:26+02:00</published>
        <updated>2021-05-05T07:55:26+02:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/pip-upgrade/"/>
        <id>https://nbari.com/pip-upgrade/</id>
        
        <content type="html" xml:base="https://nbari.com/pip-upgrade/">&lt;p&gt;Upgrade using:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pip list --outdated --format=freeze | grep -v &amp;#39;^\-e&amp;#39; | cut -d = -f 1 | xargs -n1 pip3 install --upgrade --user&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Python quit unexpectedly macOS Catalina</title>
        <published>2020-01-20T17:21:40+01:00</published>
        <updated>2020-01-20T17:21:40+01:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/python-quit-unexpectedly-macos/"/>
        <id>https://nbari.com/python-quit-unexpectedly-macos/</id>
        
        <content type="html" xml:base="https://nbari.com/python-quit-unexpectedly-macos/">&lt;p&gt;When running something depending on OpenSSL you may get something like this on
&lt;code&gt;macOS 10.15.2&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/img/python_quit_1.png&quot; alt=&quot;python quit unexpectedly&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The output of the report:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/img/python_quit_2.png&quot; alt=&quot;python quit unexpectedly report&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; /&gt;&lt;/p&gt;
&lt;p&gt;To fix:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;brew reinstall openssl&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cd /usr/local/lib&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s /usr/local/opt/openssl/lib/libssl.dylib libssl.dylib&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s /usr/local/opt/openssl/lib/libcrypto.dylib libcrypto.dylib&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>macOs catalina &amp; python</title>
        <published>2019-11-12T16:20:28+01:00</published>
        <updated>2019-11-12T16:20:28+01:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/catalina-python/"/>
        <id>https://nbari.com/catalina-python/</id>
        
        <content type="html" xml:base="https://nbari.com/catalina-python/">&lt;p&gt;Reinstall openssl:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;brew reinstall openssl&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib:$DYLD_LIBRARY_PATH&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or create the link manually:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cd /usr/local/lib&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s /usr/local/opt/openssl/lib/libssl.dylib libssl.dylib&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s /usr/local/opt/openssl/lib/libcrypto.dylib libcrypto.dylib&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reinstall python:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;brew reinstall python&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Upgrade pip packages:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pip install -U --user $(pip freeze | awk -F&amp;#39;[=]&amp;#39; &amp;#39;{print $1}&amp;#39;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>python site packages</title>
        <published>2018-06-07T14:22:46+02:00</published>
        <updated>2018-06-07T14:22:46+02:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/site-packages/"/>
        <id>https://nbari.com/site-packages/</id>
        
        <content type="html" xml:base="https://nbari.com/site-packages/">&lt;p&gt;To find the python &lt;code&gt;site-packages&lt;/code&gt; paths:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ python -m site&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</title>
        <published>2018-03-22T15:28:13+01:00</published>
        <updated>2018-03-22T15:28:13+01:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/objc-disable-initialize-fork-safety/"/>
        <id>https://nbari.com/objc-disable-initialize-fork-safety/</id>
        
        <content type="html" xml:base="https://nbari.com/objc-disable-initialize-fork-safety/">&lt;p&gt;In macOS High Sierra if getting this:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;objc[55492]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;objc[55492]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Define:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will fix temporally fix the problem and allow program to continue
executing, more about this issue here: http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>webscraping</title>
        <published>2016-10-27T21:37:13+02:00</published>
        <updated>2016-10-27T21:37:13+02:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/webscraping/"/>
        <id>https://nbari.com/webscraping/</id>
        
        <content type="html" xml:base="https://nbari.com/webscraping/">&lt;h1 id=&quot;webscraping-using-python-chrome&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#webscraping-using-python-chrome&quot; aria-label=&quot;Anchor link for: webscraping-using-python-chrome&quot;&gt;🔗&lt;/a&gt;Webscraping using python + chrome&lt;/h1&gt;
&lt;p&gt;In mac OS X, install chromedriver and selenium:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;brew install chromedriver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Install selenium via pip:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pip install -U selenium&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;if required to install globally &lt;code&gt;sudo pip install selenium&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To test, open a terminal, type python and try:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Python 2.7.12 (default, Oct 11 2016, 05:20:59)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type &amp;quot;help&amp;quot;, &amp;quot;copyright&amp;quot;, &amp;quot;credits&amp;quot; or &amp;quot;license&amp;quot; for more information.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt; from selenium import webdriver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt; driver = webdriver.Chrome()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt; driver.get(&amp;quot;https://nbari.com&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&quot;scraping&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#scraping&quot; aria-label=&quot;Anchor link for: scraping&quot;&gt;🔗&lt;/a&gt;scraping&lt;/h1&gt;
&lt;p&gt;The following example will do:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fill a form,&lt;/li&gt;
&lt;li&gt;Parse links of the results.&lt;/li&gt;
&lt;li&gt;Open each link.&lt;/li&gt;
&lt;li&gt;Get text data from a div.&lt;/li&gt;
&lt;li&gt;Go back to step 2 until all links are parsed.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-3 z-i&quot;&gt;from&lt;/span&gt;&lt;span&gt; selenium&lt;/span&gt;&lt;span class=&quot;z-3 z-i&quot;&gt; import&lt;/span&gt;&lt;span&gt; webdriver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-3 z-i&quot;&gt;from&lt;/span&gt;&lt;span&gt; selenium&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span&gt;webdriver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span&gt;common&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span&gt;keys&lt;/span&gt;&lt;span class=&quot;z-3 z-i&quot;&gt; import&lt;/span&gt;&lt;span&gt; Keys&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;driver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; =&lt;/span&gt;&lt;span&gt; webdriver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;Chrome&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;driver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt;https://search.cro.ie/company/CompanySearch.aspx&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;inputElement&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; =&lt;/span&gt;&lt;span&gt; driver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;find_element_by_id&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt;ctl00_ContentPlaceHolder1_textCompanyName&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;inputElement&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;send_keys&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt;limo&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;inputElement&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;send_keys&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;Keys&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-9&quot;&gt;ENTER&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;links&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; =&lt;/span&gt;&lt;span&gt; driver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;find_elements_by_xpath&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt;//*[@id=&amp;#39;ctl00_ContentPlaceHolder1_GridView1&amp;#39;]/tbody/tr/td/a&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;data&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; = {}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-3 z-i&quot;&gt;for&lt;/span&gt;&lt;span&gt; i&lt;/span&gt;&lt;span class=&quot;z-3 z-i&quot;&gt; in&lt;/span&gt;&lt;span&gt; xrange&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-10&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt; len&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;links&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;)):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    links&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; =&lt;/span&gt;&lt;span&gt; driver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;find_elements_by_xpath&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt;//*[@id=&amp;#39;ctl00_ContentPlaceHolder1_GridView1&amp;#39;]/tbody/tr/td/a&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    idx_name&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; =&lt;/span&gt;&lt;span&gt; links&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;[&lt;/span&gt;&lt;span&gt;i&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;z-9&quot;&gt;text&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    links&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;[&lt;/span&gt;&lt;span&gt;i&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    div&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; =&lt;/span&gt;&lt;span&gt; driver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;find_element_by_id&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt;companyDetails&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    data&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;[&lt;/span&gt;&lt;span&gt;idx_name&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;] =&lt;/span&gt;&lt;span&gt; div&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-9&quot;&gt;text&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    driver&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;execute_script&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt;window.history.go(-1)&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-3 z-i&quot;&gt;for&lt;/span&gt;&lt;span&gt; key&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;,&lt;/span&gt;&lt;span&gt; value&lt;/span&gt;&lt;span class=&quot;z-3 z-i&quot;&gt; in&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt; sorted&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-2&quot;&gt;iteritems&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;()):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-2&quot;&gt;    print&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span class=&quot;z-7&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot; *&lt;/span&gt;&lt;span class=&quot;z-10&quot;&gt; 64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-2&quot;&gt;    print&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span class=&quot;z-10&quot;&gt;%s&lt;/span&gt;&lt;span&gt;\n&lt;/span&gt;&lt;span class=&quot;z-10&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;&amp;quot; % (&lt;/span&gt;&lt;span&gt;key&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;,&lt;/span&gt;&lt;span&gt; value&lt;/span&gt;&lt;span class=&quot;z-3&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
</feed>
