steam по-русски
This commit is contained in:
parent
b1057e159c
commit
9d3c766b7c
|
@ -4,6 +4,7 @@ namespace Source;
|
|||
use \Game;
|
||||
use \Symfony\Component\DomCrawler\Crawler;
|
||||
use \GuzzleHttp\Cookie\CookieJar;
|
||||
use \GuzzleHttp\Cookie\SetCookie;
|
||||
|
||||
class Steam extends Source {
|
||||
public $title = "Steam";
|
||||
|
@ -51,11 +52,22 @@ class Steam extends Source {
|
|||
return (strpos($url,'http://store.steampowered.com/') !== FALSE);
|
||||
}
|
||||
public function page($url) {
|
||||
$this->cookies = new CookieJar([
|
||||
'mature_content' => 1,
|
||||
'Steam_Language' => 'russian',
|
||||
'timezoneOffset' => '0,0'
|
||||
]);
|
||||
$this->cookies = new CookieJar(true);
|
||||
$this->cookies->setCookie(new SetCookie([
|
||||
'Domain' => 'store.steampowered.com',
|
||||
'Name' => 'mature_content',
|
||||
'Value' => 1
|
||||
]));
|
||||
$this->cookies->setCookie(new SetCookie([
|
||||
'Domain' => 'store.steampowered.com',
|
||||
'Name' => 'Steam_Language',
|
||||
'Value' => 'russian'
|
||||
]));
|
||||
$this->cookies->setCookie(new SetCookie([
|
||||
'Domain' => 'store.steampowered.com',
|
||||
'Name' => 'timezoneOffset',
|
||||
'Value' => '0,0'
|
||||
]));
|
||||
$this->loadStr($this->get_text($url));
|
||||
|
||||
$game = new Game;
|
||||
|
|
Reference in a new issue