<?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: Python Implementation Question in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514493#M40373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sam, are you just trying to see if the files are the same? If so, how about doing something like:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; filecmp
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; file1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"c:\temp\foo.txt"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; file2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"c:\temp\bar.txt"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; filecmp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cmp&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;file1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; file2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Of course, you can't compare XLS and CSV, you'd have to be comparing apples to apples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:29:15 GMT</pubDate>
    <dc:creator>Arne_Gelfert</dc:creator>
    <dc:date>2021-12-11T22:29:15Z</dc:date>
    <item>
      <title>Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514491#M40371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello I am trying to figure out the if there is a way to compare two excel file's dates/time?&lt;/P&gt;&lt;P&gt;I wrote a python script, attached below, that downloads a excel file from a website and when I run it again&lt;/P&gt;&lt;P&gt;it pushed the file that was downloaded first to an archived folder and the new file that gets downloads foes to where the old was was originally at and it becomes am excel to csv file in the end.&lt;/P&gt;&lt;P&gt;Excel File Link:&amp;nbsp;&lt;A class="link-titled" href="https://www.gosolarcalifornia.ca.gov/equipment/documents/Grid_Support_Inverter_List_Full_Data.xlsm" title="https://www.gosolarcalifornia.ca.gov/equipment/documents/Grid_Support_Inverter_List_Full_Data.xlsm"&gt;https://www.gosolarcalifornia.ca.gov/equipment/documents/Grid_Support_Inverter_List_Full_Data.xlsm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Website Link:&amp;nbsp;&lt;A class="link-titled" href="https://www.gosolarcalifornia.ca.gov/equipment/inverters.php" title="https://www.gosolarcalifornia.ca.gov/equipment/inverters.php"&gt;Inverters&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got this idea so far:import pandas as pd &lt;BR /&gt;#Reading two Excel Sheets &lt;BR /&gt; &lt;BR /&gt;sheet1 = pd.read_excel(r'Book1.xlsx') &lt;BR /&gt;sheet2 = pd.read_excel(r'Book2.xlsx') &lt;BR /&gt; &lt;BR /&gt;# Iterating the Columns Names of both Sheets &lt;BR /&gt;for i,j in zip(sheet1,sheet2): &lt;BR /&gt; &lt;BR /&gt; # Creating empty lists to append the columns values &lt;BR /&gt; a,b =[],[] &lt;BR /&gt; &lt;BR /&gt; # Iterating the columns values &lt;BR /&gt; for m, n in zip(sheet1&lt;I&gt;,sheet2&lt;J&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;BR /&gt; &lt;BR /&gt; # Appending values in lists &lt;BR /&gt; a.append(m) &lt;BR /&gt; b.append(n) &lt;BR /&gt; &lt;BR /&gt; # Sorting the lists &lt;BR /&gt; a.sort() &lt;BR /&gt; b.sort() &lt;BR /&gt; &lt;BR /&gt; # Iterating the list's values and comparing them &lt;BR /&gt; for m, n in zip(range(len(a)), range(len(b))): &lt;BR /&gt; if a&lt;M&gt; != b&lt;N&gt;: &lt;BR /&gt; print('Column name : \'{}\' and Row Number : {}'.format(i,m))&lt;/N&gt;&lt;/M&gt;&lt;/J&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way I can do this logic:&lt;BR /&gt;if(file1 != file2):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;run script&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;do nothing&lt;/P&gt;&lt;P&gt;It's the conditional statement that I am stuck on.&lt;/P&gt;&lt;P&gt;*file 1 is the excel on the website and file 2 is the download excel file on the computer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2019 22:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514491#M40371</guid>
      <dc:creator>SamLee1</dc:creator>
      <dc:date>2019-12-23T22:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514492#M40372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly, you want a way to compare the created or modified date of two files? &lt;A href="https://stackoverflow.com/a/39501288"&gt;Here's one solution I found&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2019 15:37:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514492#M40372</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2019-12-24T15:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514493#M40373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sam, are you just trying to see if the files are the same? If so, how about doing something like:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; filecmp
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; file1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"c:\temp\foo.txt"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; file2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"c:\temp\bar.txt"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; filecmp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cmp&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;file1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; file2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Of course, you can't compare XLS and CSV, you'd have to be comparing apples to apples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:29:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514493#M40373</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2021-12-11T22:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514494#M40374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arne,&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;How about if the excel file is on the website, how can I compare an excel file on my desktop with an excel file on a website without downloading it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2019 16:19:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514494#M40374</guid>
      <dc:creator>SamLee1</dc:creator>
      <dc:date>2019-12-24T16:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514495#M40375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry... I guess I didn't read&amp;nbsp;your post correctly. I think with remote files you&amp;nbsp;may be back to comparing dates if unable to download it. You can use&amp;nbsp;things like urllib for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2019 16:41:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514495#M40375</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2019-12-24T16:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514496#M40376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: #006699 !important; background: none !important; border: 0px !important; font-weight: bold !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;import&lt;/CODE&gt; &lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;urllib.request &lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;request_url &lt;/CODE&gt;&lt;CODE class="" style="color: #006699 !important; background: none !important; border: 0px !important; font-weight: bold !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;=&lt;/CODE&gt; &lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;urllib.request.urlopen(&lt;/CODE&gt;&lt;CODE class="" style="color: blue !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;'&lt;A class="link-titled" href="https://www.gosolarcalifornia.ca.gov/equipment/documents/Grid_Support_Inverter_List_Full_Data.xlsm" title="https://www.gosolarcalifornia.ca.gov/equipment/documents/Grid_Support_Inverter_List_Full_Data.xlsm"&gt;https://www.gosolarcalifornia.ca.gov/equipment/documents/Grid_Support_Inverter_List_Full_Data.xlsm&lt;/A&gt;&amp;nbsp;'&lt;/CODE&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;) &lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;file1 = r"C:\temp\Hello.xslm&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;if(filecmp.cmp(request_url, file1):&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;run python script&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;else:&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;do nothing&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: rgba(0, 0, 0, 0.84); background: none white !important; border: 0px !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px 1em 0px 0em !important;"&gt;&lt;CODE class="" style="color: black !important; background: none !important; border: 0px !important; font-weight: normal !important; font-size: 0.99em !important; margin: 0px !important; padding: 0px !important;"&gt;Will this work?&lt;/CODE&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2019 17:10:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514496#M40376</guid>
      <dc:creator>SamLee1</dc:creator>
      <dc:date>2019-12-24T17:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514497#M40377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is kind of a hacky solution that just parses the file index page for the file you want and gets the date listed in the next cell of the same table row. You can then compare this date with the date of your local file to decide if you want to download it.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; datetime
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; requests
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; time

indexHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://www.gosolarcalifornia.ca.gov/equipment/documents/"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;text
fileName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Grid_Support_Inverter_List_Full_Data.xlsm"&lt;/SPAN&gt;
fileNameHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;td&amp;gt;&amp;lt;a href="{0}"&amp;gt;{0}&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fileNameHTMLIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileNameHTML&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; fileNameHTMLIndex &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    dateStartIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fileNameHTMLIndex&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileNameHTML&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
    dateEndIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;lt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dateStartIndex&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    webFileDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strptime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;indexHTML&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;dateStartIndex&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;dateEndIndex&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strip&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%Y-%m-%d %H:%M"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;raise&lt;/SPAN&gt; Exception&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Unable to find fileName {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

localFilePath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"your\local\path\here"&lt;/SPAN&gt;
localFileDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getctime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;localFilePath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
localFileDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strptime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ctime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;localFileDate&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%a %b %d %H:%M:%S %Y"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; webFileDate &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; localFileDate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"File on the web is newer!"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;# download web file to replace local file‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, just download the file and use the method&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/339735" target="_blank"&gt;Arne Gelfert&lt;/A&gt;‌ mentioned to compare them for differences. The file isn't large so it shouldn't take excessively long to download and the logic is much simpler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514497#M40377</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-12-11T22:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514498#M40378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Blake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, I believe it works because I added an else statement, since the file on the website hasn't been updated yet.&lt;/P&gt;&lt;P&gt;To clarify, we are comparing the date of those two files despite one of them being a csv file which is the file on the local&lt;/P&gt;&lt;P&gt;drive and not the website, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2019 17:12:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514498#M40378</guid>
      <dc:creator>SamLee1</dc:creator>
      <dc:date>2019-12-26T17:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514499#M40379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct. My method is only comparing file dates so it doesn't matter what the file actually &lt;EM&gt;is&lt;/EM&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2019 17:33:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514499#M40379</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2019-12-26T17:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514500#M40380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it comparing the modified date or just date in general?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2019 17:42:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514500#M40380</guid>
      <dc:creator>SamLee1</dc:creator>
      <dc:date>2019-12-26T17:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514501#M40381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My code sample is comparing the date listed for the file on the website (not sure what date it is) with the &lt;STRONG&gt;created&lt;/STRONG&gt; date for the file on your local drive. You can adjust the line with &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;getctime()&lt;/SPAN&gt; to &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;getmtime()&lt;/SPAN&gt; if you want the &lt;STRONG&gt;modified&lt;/STRONG&gt; date instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might want to do some testing to make sure the file you download from the website has a created date either when it was downloaded or that matches what's listed on the website.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2019 15:49:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514501#M40381</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2019-12-27T15:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514502#M40382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Blake,&lt;/P&gt;&lt;P&gt;May you explain a little bit more about the code, specifically this part of the code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;indexHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://www.gosolarcalifornia.ca.gov/equipment/documents/"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;text
fileName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Grid_Support_Inverter_List_Full_Data.xlsm"&lt;/SPAN&gt;
fileNameHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;td&amp;gt;&amp;lt;a href="{0}"&amp;gt;{0}&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fileNameHTMLIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileNameHTML&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; fileNameHTMLIndex &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    dateStartIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fileNameHTMLIndex&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileNameHTML&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
    dateEndIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;lt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dateStartIndex&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    webFileDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strptime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;indexHTML&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;dateStartIndex&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;dateEndIndex&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strip&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%Y-%m-%d %H:%M"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;raise&lt;/SPAN&gt; Exception&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Unable to find fileName {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Line 4 will return a -1 if fileNameHTML is not found in indexHTML. So, line 5 checks for the presence of a &amp;lt;td&amp;gt; tag with the filename. In the event it is found (the value is not -1), it then checks for the first "&amp;gt;" and the first "&amp;lt;" in indexHTML on lines 6 and 7. Using the returned indexes, it slices indexHTML, strips the leading and trailing white space, and formats the text into a datetime object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:29:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514502#M40382</guid>
      <dc:creator>SamLee1</dc:creator>
      <dc:date>2021-12-11T22:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514503#M40383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Line 4 will return a -1 if fileNameHTML is not found in indexHTML. So, line 5 checks for the presence of a &amp;lt;td&amp;gt; tag with the filename. In the event it is found (the value is not -1), it then checks for the first "&amp;gt;" and the first "&amp;lt;" in indexHTML on lines 6 and 7. Using the returned indexes, it slices indexHTML, strips the leading and trailing white space, and formats the text into a datetime object.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, that's exactly right. That was the simplest way I could think (with builtin libraries) to get the text value of the tag in the HTML table. This does assume the filenames are all unique, which I think is safe. Once it finds the file name, it assumes the next&amp;nbsp;tag will contain the date. I simplified this to just look for the first &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt;&lt;/SPAN&gt; (indiciating the last character of the opening tag) and the next &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;lt;&lt;/SPAN&gt; after that (indicating the first character of the closing tag). The value of the tag (the date) will be between those two characters. Hopefully that&amp;nbsp;is clear and you can comment that section in a way that makes sense to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2020 16:26:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514503#M40383</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2020-01-03T16:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python Implementation Question</title>
      <link>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514504#M40384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Line 13 is a little dense so here it is separated to be a little more clear.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; datetime
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; requests
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; time

indexHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://www.gosolarcalifornia.ca.gov/equipment/documents/"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;text
fileName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Grid_Support_Inverter_List_Full_Data.xlsm"&lt;/SPAN&gt;
fileNameHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;td&amp;gt;&amp;lt;a href="{0}"&amp;gt;{0}&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fileNameHTMLIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileNameHTML&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; fileNameHTMLIndex &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    dateStartIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fileNameHTMLIndex&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileNameHTML&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
    dateEndIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;find&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;lt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dateStartIndex&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    webFileDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; indexHTML&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;dateStartIndex&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;dateEndIndex&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strip&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    webFileDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strptime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;webFileDate&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%Y-%m-%d %H:%M"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;raise&lt;/SPAN&gt; Exception&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Unable to find fileName {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fileName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

localFilePath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"your\local\path\here"&lt;/SPAN&gt;
localFileDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getctime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;localFilePath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
localFileDate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strptime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ctime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;localFileDate&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%a %b %d %H:%M:%S %Y"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; webFileDate &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; localFileDate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"File on the web is newer!"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;# download web file to replace local file&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-implementation-question/m-p/514504#M40384</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-12-11T22:29:24Z</dc:date>
    </item>
  </channel>
</rss>

