Moved video files to public/videos directory, small refactoring.
This commit is contained in:
@@ -18,11 +18,8 @@ class SymfonyCastDlService
|
||||
'base_uri' => config('symfonycast.base_url'),
|
||||
'cookies' => true
|
||||
]);
|
||||
|
||||
$response = $this->client->get('login');
|
||||
|
||||
$token = $htmlParser->getCsrfToken($response);
|
||||
|
||||
$this->client->post('login', [
|
||||
'form_params' => [
|
||||
'email' => config('symfonycast.login'),
|
||||
@@ -38,7 +35,6 @@ class SymfonyCastDlService
|
||||
public function getInfo(): void
|
||||
{
|
||||
$coursePage = $this->client->get('courses/filtering');
|
||||
|
||||
$courses = $this->htmlParser->getCourses($coursePage);
|
||||
$courses->each->save();
|
||||
/** @var Course $course */
|
||||
@@ -68,7 +64,7 @@ class SymfonyCastDlService
|
||||
return;
|
||||
}
|
||||
if (!is_dir($chapter->directory_path)) {
|
||||
mkdir($chapter->directory_path);
|
||||
mkdir(directory: $chapter->directory_path, recursive: true);
|
||||
}
|
||||
if (!$chapter->is_video_file) {
|
||||
$this->client->request(
|
||||
|
||||
Reference in New Issue
Block a user