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