Нету кода - нету правок.
DISCOUNTS FOR AFFILIATE LINKS
Attract more customers to your shop by applying deals to customers who land on your Woocommerce shop, following an affiliation link.
def get_updates(self, offset=None, timeout=30):
https://www.dns-shop.ru/catalogMarkdown/category/update/?offset=40
GET https://www.dns-shop.ru/catalogMarkdown/category/update/?offset=40 HTTP/1.1
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 YaBrowser/18.6.1.770 Yowser/2.5 Safari/537.36
Host: www.dns-shop.ru
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $server_endpoint = "https://www.dns-shop.ru/catalogMarkdown/category/update/?offset=40";
# set custom HTTP request header fields
my $req = HTTP::Request->new(GET => $server_endpoint);
$req->header('X-Requested-With' => 'XMLHttpRequest');
my $resp = $ua->request($req);
if ($resp->is_success) {
my $message = $resp->decoded_content;
print "Received reply: $message\n";
}
else {
print "HTTP GET error code: ", $resp->code, "\n";
print "HTTP GET error message: ", $resp->message, "\n";
}
[^]{5}(?=-(.*?)$)