title: Get value from html body from Dart
body: <p>I'd like to make an HTTP POST request with Dart but I need two variables that changes every time I reload the page.</p>
  
  <p>For the first variable, I solved the problem with a GET request and extracted a JSession cookie in the response header.</p>
  
  <p>The second variable is inside a login form, with name="lt" and I need the value indicated with XXXXXX.</p>
  
  <pre><code>&lt;div id="fm1Inside"&gt;
      &lt;label for="username" accesskey="U"&gt;
          &lt;span class="accesskey" title="U: accesskey"&gt;U&lt;/span&gt;sername:
      &lt;/label&gt;
      &lt;input id="username" name="username" class="required" tabindex="10" type="text" value="" size="25" autocomplete="false"/&gt;
      &lt;label for="password" accesskey="P"&gt;
          &lt;span class="accesskey" title="P: accesskey"&gt;P&lt;/span&gt;assword:
      &lt;/label&gt;
      &lt;input id="password" name="password" class="required" tabindex="20" type="password" value="" size="25"/&gt;
      &lt;input id="submit" class="btn-submit" name="submit" accesskey="L" value="Login" tabindex="40" type="submit" /&gt;
      &lt;input type="hidden" name="lt" value="XXXXXX" /&gt;
      &lt;input type="hidden" name="_eventId" value="submit" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now, I don't know how to achieve this on dart.
  I searched how to do it with HTML and I found this:</p>
  
  <pre><code>document.getElementsByName("lt")[0].value;
  </code></pre>
  
  <p>It works, but how can I do this on dart?</p>
  
  <p>I've also tried this code on Dart</p>
  
  <pre><code>Response response = await get(url);
  print(response.body);
  </code></pre>
  
  <p>but the console in Android Studio doesn't print all the html document, just few lines.</p>
  
  <p>If anyone can help me, <a href="https://bridge.si.unimib.it/cas_all_unimib/logins" rel="nofollow noreferrer">this is the website</a></p>