|
@@ -8,10 +8,11 @@ namespace Rac.Tools
|
|
|
|
|
|
internal static class Requester
|
|
internal static class Requester
|
|
{
|
|
{
|
|
- public static Response GetHttp(string url)
|
|
|
|
|
|
+ public static Response GetHttp(string url, string referer = null)
|
|
{
|
|
{
|
|
var req = WebRequest.CreateHttp(url);
|
|
var req = WebRequest.CreateHttp(url);
|
|
req.UserAgent = "RawArchiveCrawler";
|
|
req.UserAgent = "RawArchiveCrawler";
|
|
|
|
+ if (referer != null) req.Referer = referer;
|
|
|
|
|
|
req.AllowAutoRedirect = false; //record redirections
|
|
req.AllowAutoRedirect = false; //record redirections
|
|
|
|
|