Advertisement
Guest User

2chproxy-fix-ufoon.patch

a guest
Mar 28th, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.66 KB | None | 0 0
  1. --- 2chproxy.pl.org 2017-03-18 01:28:38.029551523 +0900
  2. +++ 2chproxy.pl 2017-03-28 20:27:49.050388953 +0900
  3. @@ -1205,7 +1205,11 @@ sub scraping_2ch_response() {
  4.      $charset  = 'Guess';
  5.    }
  6.    &print_log(LOG_INFO, 'SCRAPING', "charset: ".$charset."\n");
  7. -  my @content_array  = &html2dat($response->decoded_content(charset => $charset));
  8. +  my $last_num = 0;
  9. +  if ($response->request()->uri() =~ m@/(\d+)-n$@) {
  10. +    $last_num = $1 + 0;
  11. +  }
  12. +  my @content_array  = &html2dat($response->decoded_content(charset => $charset), $last_num);
  13.    &print_log(LOG_INFO, 'SCRAPING', "size of content_array: ".($#content_array+1)."\n");
  14.  
  15.    #chunkedは消毒だー
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement