hunk.code_window:     const url = `http://${site}/api/v1/timelines/public?local=true&only_media=${only_media}`;
       const response = await got.get(url);
       const list = response.data;
       ctx.set('data', {
           title: `Local Public${ctx.req.param('only_media') ? ' Media' : ''} Timeline on ${site}`,
           link: `https://${site}`,
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:     const response = await got.get(url, { headers: utils.apiHeaders() });
  
hunk.file_path: lib/routes/mastodon/timeline-local.js
hunk.type: replace
file: import got from '@/utils/got';
  import { load } from 'cheerio';
  import { parseDate } from '@/utils/parse-date';
  import md5 from '@/utils/md5';
  
  const baseUrl = 'https://www.techpowerup.com';
  
  const headers = {
      cookie: `botcheck=${md5(Date.now().toString())}`,
  };
  
  const fixImages = ($) => {
      $('div.responsive-image-xx').each((_, d) => {
          removeResponsiveStyle(d);
      });
      $('figure').each((_, f) => {
          removeFigureStyle(f);
      });
      $('.newspost img').each((_, img) => {
          hdImage(img);
      });
  };
  
  const hdImage = (img) => {
      img.attribs.src = img.attribs.src.replace('_thm', '').replace('_small', '');
      if (img.parentNode.name === 'a' && img.parentNode.attribs['data-width'] && img.parentNode.attribs['data-height']) {
          img.attribs.width = img.parentNode.attribs['data-width'];
          img.attribs.height = img.parentNode.attribs['data-height'];
      }
  };
  const removeFigureStyle = (f) => {
      delete f.attribs.style;
  };
  
  const removeResponsiveStyle = (div) => {
      delete div.attribs.style;
  };
  
  const parseReviews = async ($, item) => {
      const { review } = JSON.parse($('script[type="application/ld+json"]').text());
  
      const content = $('.text');
      const nextPages = $('#pagesel option')
          .toArray()
          .map((a) => `${baseUrl}${a.attribs.value}`)
          .slice(1, -1);
  
      if (nextPages.length) {
          const pages = await Promise.all(
              nextPages.map(async (url) => {
                  const { data: response } = await got(url, {
                      headers,
                  });
                  const $ = load(response);
                  $('.text div.responsive-image-xx').each((_, d) => {
                      removeResponsiveStyle(d);
                  });
                  $('.text figure').each((_, f) => {
                      removeFigureStyle(f);
                  });
                  $('.text img').each((_, img) => {
                      hdImage(img);
                  });
                  return $('.text').html();
              })
          );
          content.append(pages);
      }
  
      item.author = review.author.name;
      item.pubDate = parseDate(review.datePublished);
      item.updated = parseDate(review.dateModified);
      item.description = content.html();
  };
  
  module.exports = {
      baseUrl,
      headers,
      fixImages,
      hdImage,
      parseReviews,
      removeFigureStyle,
      removeResponsiveStyle,
  };
  