Comments (8)
it must be fixed with latest update.
from codecourse-downloader.
downloading in 1kb @hakanersu
from codecourse-downloader.
Can you change this lines to https://github.com/hakanersu/codecourse-downloader/blob/master/src/App.php#L121-L142
try {
$url = $this->remote->getRedirectUrl($lesson->link);
$this->remote->web->request('GET', $url, [
'sink' => $sink,
'progress' => function ($dl_total_size, $dl_size_so_far, $ul_total_size, $ul_size_so_far) use ($progressBar, $courseTitle, $lesson) {
$total = \ByteUnits\bytes($dl_total_size)->format('MB');
$sofar = \ByteUnits\bytes($dl_size_so_far)->format('MB');
$percentage = $dl_total_size != '0.00' ? number_format($dl_size_so_far * 100 / $dl_total_size) : 0;
$progressBar->setMessage("Downloading ({$courseTitle}): {$lesson->title} {$sofar}/{$total} ({$percentage}%)", 'status');
// It takes too much time to figure this line. Without advance() it was not update message.
// With this method i can update message.
$progressBar->display();
},
]);
} catch (\Exception $e) {
//error("Cant download '{$lesson->title}'. Do you have active subscription?");
dd($e->getMessage());
continue;
} catch (GuzzleException $e) {
dd($e->getMessage());
continue;
//error("Cant download '{$lesson->title}'. Do you have active subscription?");
}
from codecourse-downloader.
from codecourse-downloader.
I can make it stop when $dl_total_size
is 1kb or skip.
from codecourse-downloader.
I have a problem with snippets as well but now, in my case, any file was downloaded. The process skip the file directly without any error only:
All videos downloaded for course: cleanly-iterating-over-javascript-objects
0/0 [>---------------------------] 0%
The snippets have a different page, so i guest the problem came from there.
I will work in a PR when i have a bit of time.
from codecourse-downloader.
@ralbear I am appreciated any pr.
from codecourse-downloader.
That's my plan, now lets see if i have a moment to do that! 😄
from codecourse-downloader.
Related Issues (20)
- cannot play downloaded video HOT 1
- Curl error HOT 3
- Rate limit, doesn`t download HOT 4
- [InvalidArgumentException] The current node list is empty HOT 16
- URI must be a string or UriInterface HOT 2
- code.zip not downloading HOT 2
- Download fails at middle HOT 5
- PHP Notice: Undefined property: stdClass HOT 5
- Can't fetch redirect url HOT 4
- Can't download videos HOT 3
- invalid argument supplied for foreach() HOT 2
- Cannot download.
- Invalid characters should be removed HOT 1
- Should be able to skip missing courses as it stops download
- Not Download Properly HOT 2
- Can't Download Series HOT 1
- Downloaded folders are empty HOT 3
- Does it support resume? Or it starts from the beginning each time? HOT 3
- Can't login to website. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codecourse-downloader.