title: how to insert the html url input form into python?
body: <p>I am working on web scraping project and I am new in python but I have a problem about how to insert/get the user url input form and insert it into python script to scrape this input url and display the data back to the html file</p>
  
  <p>I tried alot of ways with days but still nothing.</p>
  
  <p>here is the code (html):</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form method="get" onsubmit="return formsubmit();" action="test2.py"&gt;
       &lt;input type="url" name="asin" id="asin" class="input-text" placeholder="Enter your link here e.g. (https://www.amazon.com/gp/product/B064GWQXUJ1/)"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>test.py:</p>
  
  <pre class="lang-py prettyprint-override"><code>import requests
  from bs4 import BeautifulSoup
  import re
  
  URL = "https://www.amazon.com/" 
  # This URL I need it dynamically as per user input in the html file
  
  res = requests.get(URL, headers={'User-Agent':'Mozilla/5.0'})
  soup = BeautifulSoup(res.text, "lxml")
  
  price = soup.select_one("#priceblock_ourprice").text
  size = soup.select_one("#dropdown_selected_size_name .a-dropdown-prompt").text    
  color = soup.select_one("#dropdown_selected_color_name .a-dropdown-prompt").text
  shipping_weight = soup.select_one("#productDetails_detailBullets_sections1 tr:nth-child(3) td").text
  title = soup.select_one("#productTitle").text.split()
  
  # I need to display the results into the html file with all these details 
  print(price)
  print(size)
  print(color)
  print(shipping_weight)
  print(title)
  </code></pre>
  
  <p>Any help please ?</p>