Refactor proxy_list into global

This commit is contained in:
Omar Roth
2019-06-28 21:17:56 -05:00
parent a58f5a925a
commit e30d70b6d4
7 changed files with 42 additions and 55 deletions

View File

@@ -56,8 +56,8 @@ class RedditListing
})
end
def fetch_youtube_comments(id, db, continuation, proxies, format, locale, thin_mode, region, sort_by = "top")
video = get_video(id, db, proxies, region: region)
def fetch_youtube_comments(id, db, continuation, format, locale, thin_mode, region, sort_by = "top")
video = get_video(id, db, region: region)
session_token = video.info["session_token"]?
ctoken = produce_comment_continuation(id, cursor: "", sort_by: sort_by)
@@ -75,7 +75,7 @@ def fetch_youtube_comments(id, db, continuation, proxies, format, locale, thin_m
session_token: session_token,
}
client = make_client(YT_URL, proxies, video.info["region"]?)
client = make_client(YT_URL, video.info["region"]?)
headers = HTTP::Headers.new
headers["content-type"] = "application/x-www-form-urlencoded"