title: How make simple fast request with "requests" module python?
body: <p>I am a beginner in python,im just trying to scrape web with  module <code>requests</code>  and <code>BeautifulSoup</code> This <a href="https://www.jobstreet.co.id/en/job-search/job-vacancy.php?ojs=6" rel="nofollow noreferrer">Website</a> i make request.</p>
  <p>and my simple code:</p>
  <pre><code>import requests, time, re, json
  from bs4 import BeautifulSoup as BS
  
  url = &quot;https://www.jobstreet.co.id/en/job-search/job-vacancy.php?ojs=6&quot;
  
  def list_jobs():
      try:
          with requests.session() as s:
              st = time.time()
              s.headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0'}
              req = s.get(url)
              soup = BS(req.text,'html.parser')
              attr = soup.findAll('div',class_='position-title header-text')
              pttr = r&quot;.?(.*)Rank=\d+&quot;
              lists = {&quot;status&quot;:200,&quot;result&quot;:[]}
              for a in attr:
                  sr = re.search(pttr, a.find(&quot;a&quot;)[&quot;href&quot;])
                  if sr:
                      title = a.find('a')['title'].replace(&quot;Lihat detil lowongan -&quot;,&quot;&quot;).replace(&quot;\r&quot;,&quot;&quot;).replace(&quot;\n&quot;,&quot;&quot;)
                      url = a.find('a')['href']
                      lists[&quot;result&quot;].append({
                          &quot;title&quot;:title,
                          &quot;url&quot;:url,
                          &quot;detail&quot;:detail_jobs(url)
                      })
              print(json.dumps(lists, indent=4))
              end = time.time() - st
              print(f&quot;\n{end} second&quot;)
      except:
          pass
  
  def detail_jobs(find_url):
      try:
          with requests.session() as s:
              s.headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0'}
              req = s.get(find_url)
              soup = BS(req.text,'html.parser')
              position = soup.find('h1',class_='job-position').text
              name = soup.find('div',class_='company_name').text.strip(&quot;\t&quot;)
              try:
                  addrs = soup.find('div',class_='map-col-wraper').find('p',{'id':'address'}).text
              except Exception:
                  addrs = &quot;Unknown&quot;
              try:
                  loct = soup.find('span',{'id':'single_work_location'}).text
              except Exception:
                  loct = soup.find('span',{'id':'multiple_work_location_list'}).find('span',{'class':'show'}).text        
              dests = soup.findAll('div',attrs={'id':'job_description'})
              for select in dests:
                  txt = select.text if not select.text.startswith(&quot;\n&quot;) or not select.text.endswith(&quot;\n&quot;) else select.text.replace(&quot;\n&quot;,&quot;&quot;)
                  result = {
                      &quot;name&quot;:name,
                      &quot;location&quot;:loct,
                      &quot;position&quot;:position,
                      &quot;description&quot;:txt,
                      &quot;address&quot;:addrs
                  }
                  return result
      except:
          pass
  </code></pre>
  <p>they all work well but take very long to show results time is always above 13/17 seconds</p>
  <p>i dont know how to increase my speed for requesting</p>
  <p>I tried search on stack and google,they said using asyncio but the way so hard to me.</p>
  <p>if someone have simple trick how to increase speed with simple do,im so appreciate ..</p>
  <p>And sorry for my bad English</p>