Rename video files with data from a site downloaded as html file
<p>I am only starting to get into programming so this idea sadly exceeds my current abilities.</p>

<p>I have grabbed streams from a website in order to view the video files offline on my PC or cellphone. Most of the files already have sort of correct names, but I want to put them in the right order according to their chronology / chapters since sorting by creation date does not work since the stream downloader created multiple files at once.</p>

<p>Here is a screenshot of the "table" that contains the right arrangement of the files.
<a href="http://prntscr.com/al5yoe" rel="nofollow">http://prntscr.com/al5yoe</a></p>

<p>To put them into the correct order I saved the webpage where the streams originate from as a html file hoping the data helps to solve my problem.
Here is what the folder looks like for one course (yes I have multiple so the file arranging / renameing should work on different files too)
<a href="http://prntscr.com/al63qn" rel="nofollow">http://prntscr.com/al63qn</a></p>

<p>Here is the some of the I think important parts of the html of one example course (run snippet comes already close)
If you need the full site html please notify me since this is just an extract of what I good guessed as most important to solve the issue:</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;h4 class="ga" data-ga-action="click" data-ga-label="toc-chapter" data-ga-value="388286"&gt;Introduction&lt;/h4&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;ul class="row toc-items container-fade-bottom"&gt;
  &lt;li data-video-id="388287" class="toc-video-item current" role="presentation" data-item-id="388287" data-item-type="video"&gt;
    &lt;div class="row video-row"&gt;
      &lt;div class="col-xs-11 video-name-cont"&gt;
        &lt;i class="ga lyndacon booker bookmark-outline" data-bookmark-id=""&gt;&lt;/i&gt;
        &lt;a href="http://www.lynda.com/3ds-Max-tutorials/Welcome/373552/388287-4.html" class="item-name video-name ga" role="listitem" data-ga-action="click" data-ga-label="toc-video" data-ga-value="388287"&gt;
                                        Welcome
                                    &lt;/a&gt;
        &lt;div&gt;
          &lt;span class="video-duration"&gt;1m 6s&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-xs-1 video-actions-cont"&gt;
        &lt;i class="ga watch-trigger popover-trigger lyndacon eye" data-videoid="388287" data-ga-action="click" data-ga-label="toc-video-eye" data-ga-value="388287"&gt;&lt;/i&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li data-video-id="388288" class="toc-video-item" role="presentation" data-item-id="388288" data-item-type="video"&gt;
    &lt;div class="row video-row"&gt;
      &lt;div class="col-xs-11 video-name-cont"&gt;
        &lt;i class="ga lyndacon booker bookmark-outline" data-bookmark-id=""&gt;&lt;/i&gt;
        &lt;a href="http://www.lynda.com/3ds-Max-tutorials/Using-exercise-files/373552/388288-4.html" class="item-name video-name ga" role="listitem" data-ga-action="click" data-ga-label="toc-video" data-ga-value="388288"&gt;
                                        Using the exercise files
                                    &lt;/a&gt;
        &lt;div&gt;
          &lt;span class="video-duration"&gt;1m 4s&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-xs-1 video-actions-cont"&gt;
        &lt;i class="ga watch-trigger popover-trigger lyndacon" data-videoid="388288" data-ga-action="click" data-ga-label="toc-video-eye" data-ga-value="388288"&gt;&lt;/i&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li role="presentation"&gt;
  &lt;div class="row chapter-row"&gt;
    &lt;div class="col-xs-12" role="treeitem"&gt;
      &lt;i class="lyndacon caret-grey chapter-caret ga" data-ga-action="click" data-ga-label="toc-chapter-caret" data-ga-value="388289"&gt;&lt;/i&gt;
      &lt;h4 class="ga" data-ga-action="click" data-ga-label="toc-chapter" data-ga-value="388289"&gt;1. Getting Started&lt;/h4&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;ul class="row toc-items container-fade-bottom"&gt;
    &lt;li data-video-id="388290" class="toc-video-item" role="presentation" data-item-id="388290" data-item-type="video"&gt;
      &lt;div class="row video-row"&gt;
        &lt;div class="col-xs-11 video-name-cont"&gt;
          &lt;i class="ga lyndacon booker bookmark-outline" data-bookmark-id=""&gt;&lt;/i&gt;
          &lt;a href="http://www.lynda.com/3ds-Max-tutorials/Using-project-folders/373552/388290-4.html" class="item-name video-name ga" role="listitem" data-ga-action="click" data-ga-label="toc-video" data-ga-value="388290"&gt;
                                        Using project folders
                                    &lt;/a&gt;
          &lt;div&gt;
            &lt;span class="video-duration"&gt;4m&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-1 video-actions-cont"&gt;
          &lt;i class="ga watch-trigger popover-trigger lyndacon" data-videoid="388290" data-ga-action="click" data-ga-label="toc-video-eye" data-ga-value="388290"&gt;&lt;/i&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
    &lt;li data-video-id="388291" class="toc-video-item" role="presentation" data-item-id="388291" data-item-type="video"&gt;
      &lt;div class="row video-row"&gt;
        &lt;div class="col-xs-11 video-name-cont"&gt;
          &lt;i class="ga lyndacon booker bookmark-outline" data-bookmark-id=""&gt;&lt;/i&gt;
          &lt;a href="http://www.lynda.com/3ds-Max-tutorials/Customize-user-interface-defaults/373552/388291-4.html" class="item-name video-name ga" role="listitem" data-ga-action="click" data-ga-label="toc-video" data-ga-value="388291"&gt;
                                        Customize user interface and defaults
                                    &lt;/a&gt;
          &lt;div&gt;
            &lt;span class="video-duration"&gt;4m 4s&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-1 video-actions-cont"&gt;
          &lt;i class="ga watch-trigger popover-trigger lyndacon" data-videoid="388291" data-ga-action="click" data-ga-label="toc-video-eye" data-ga-value="388291"&gt;&lt;/i&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
    &lt;li data-video-id="388292" class="toc-video-item" role="presentation" data-item-id="388292" data-item-type="video"&gt;
      &lt;div class="row video-row"&gt;
        &lt;div class="col-xs-11 video-name-cont"&gt;
          &lt;i class="ga lyndacon booker bookmark-outline" data-bookmark-id=""&gt;&lt;/i&gt;
          &lt;a href="http://www.lynda.com/3ds-Max-tutorials/Setting-preferences/373552/388292-4.html" class="item-name video-name ga" role="listitem" data-ga-action="click" data-ga-label="toc-video" data-ga-value="388292"&gt;
                                        Setting preferences
                                    &lt;/a&gt;
          &lt;div&gt;
            &lt;span class="video-duration"&gt;4m 58s&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-1 video-actions-cont"&gt;
          &lt;i class="ga watch-trigger popover-trigger lyndacon" data-videoid="388292" data-ga-action="click" data-ga-label="toc-video-eye" data-ga-value="388292"&gt;&lt;/i&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/li&gt;
&lt;li role="presentation"&gt;
  &lt;div class="row chapter-row"&gt;
    &lt;div class="col-xs-12" role="treeitem"&gt;
      &lt;i class="lyndacon caret-grey chapter-caret ga" data-ga-action="click" data-ga-label="toc-chapter-caret" data-ga-value="388293"&gt;&lt;/i&gt;
      &lt;h4 class="ga" data-ga-action="click" data-ga-label="toc-chapter" data-ga-value="388293"&gt;2. 3ds Max Interface&lt;/h4&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;ul class="row toc-items container-fade-bottom"&gt;
    &lt;li data-video-id="388294" class="toc-video-item" role="presentation" data-item-id="388294" data-item-type="video"&gt;
      &lt;div class="row video-row"&gt;
        &lt;div class="col-xs-11 video-name-cont"&gt;
          &lt;i class="ga lyndacon booker bookmark-outline" data-bookmark-id=""&gt;&lt;/i&gt;
          &lt;a href="http://www.lynda.com/3ds-Max-tutorials/Getting-familiar-interface/373552/388294-4.html" class="item-name video-name ga" role="listitem" data-ga-action="click" data-ga-label="toc-video" data-ga-value="388294"&gt;
                                        Getting familiar with the interface
                                    &lt;/a&gt;
          &lt;div&gt;
            &lt;span class="video-duration"&gt;3m 41s&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-1 video-actions-cont"&gt;
          &lt;i class="ga watch-trigger popover-trigger lyndacon" data-videoid="388294" data-ga-action="click" data-ga-label="toc-video-eye" data-ga-value="388294"&gt;&lt;/i&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
    &lt;li data-video-id="388295" class="toc-video-item" role="presentation" data-item-id="388295" data-item-type="video"&gt;
      &lt;div class="row video-row"&gt;
        &lt;div class="col-xs-11 video-name-cont"&gt;
          &lt;i class="ga lyndacon booker bookmark-outline" data-bookmark-id=""&gt;&lt;/i&gt;
          &lt;a href="http://www.lynda.com/3ds-Max-tutorials/Using-Create-Modify-panels/373552/388295-4.html" class="item-name video-name ga" role="listitem" data-ga-action="click" data-ga-label="toc-video" data-ga-value="388295"&gt;
                                        Using the Create and Modify panels
                                    &lt;/a&gt;
          &lt;div&gt;
            &lt;span class="video-duration"&gt;3m 36s&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-1 video-actions-cont"&gt;
          &lt;i class="ga watch-trigger popover-trigger lyndacon" data-videoid="388295" data-ga-action="click" data-ga-label="toc-video-eye" data-ga-value="388295"&gt;&lt;/i&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;</code></pre>
</div>
</div>
</p>

<p>Hope someone can help to create a programm to extract the info from the html to arrange the files in a logical order.</p>