Comments (5)
Hi @fboumol, that sounds right. I added it in the latest comment. Give it a try!
from soaper-dl.
Thank you. It works great.
Unfortunately, it is not working the following command (running it in the shell)
series="/tv_aTo2Mjs.html"; epi="1.1"
urlvideo=$(./soap2day-dl.sh -p "${series}" -e "${epi}" -l)
urlsubtitle=$(./soap2day-dl.sh -p "${series}" -e "${epi}" -s -l)
mpv --sub-file="${urlsubtitle}" "${urlvideo}"
The reason is that urlsubtitle
is in the domain soap2day, and it requires the right headers to acces them (even curl
without the right headers does not allow to download the subtitle). But it works if one uses the cookie information provided by soap2day, i.e., using
series="/tv_aTo2Mjs.html"; epi="1.1"
urlvideo=$(./soap2day-dl.sh -p "${series}" -e "${epi}" -l)
urlsubtitle=$(./soap2day-dl.sh -p "${series}" -e "${epi}" -s -l)
# the right values for xxx and yyy can be obtained looking at the javascript console (in chromium, firefox, ...) when accessing soap2day domain
headers=( 'User-Agent: xxx','Cookie: yyy' )
mpv --http-header-fields="${headers[@]}" --sub-file="${urlsubtitle}" "${urlvideo}"
it works. But unfortunately one needs to find the right value of "yyy" (while "xxx" can be constant), and I only know how to get it using a non automatic way (i.e., looking myself in the firerox javascript console).
Can your code of the file "getResponse.js" be easily modified to also provide in its json output the headers information your code uses? I am not familiar enough with puppeteer to know how to do it.
I suspect that an obvious advantage of providing this info would be that the shell script can be easily modified to be faster (only the first download would require the use of puppeteer).
from soaper-dl.
Hi @fboumol, right. You could use this https://github.com/KevCui/soap2day-dl/blob/840172c088ec20f8cb2b1cea0354b12426eed1bb/bin/getCookie.js to download cookies.
from soaper-dl.
Awesome, it works like a charm.
One last wondering around puppeteer. Is there any documentation (manual, reference, web pages, etc) you could suggest me to read to understand why your code works? I am looking for first-hand experience, something you have benefited from.
from soaper-dl.
Hi @fboumol, good to hear that it works for you! Regarding Puppeteer
doc, you could check their official site https://pptr.dev/#?product=Puppeteer or visit their current API doc https://github.com/puppeteer/puppeteer/blob/v13.3.2/docs/api.md.
from soaper-dl.
Related Issues (20)
- Not working ?
- curl: (6)Could not resolve host: d3.wewon.to HOT 4
- Persistent cannot get cookie error HOT 1
- Cookie HOT 18
- Media not found! HOT 3
- Chrome error HOT 18
- Can you add this site as well? HOT 1
- TypeError: page._client.send is not a function HOT 1
- Media Not Found (Again) HOT 9
- Wait a few seconds for fetching cookie... HOT 2
- Wait's forever for cookie HOT 22
- Parse Error HOT 4
- parse issue HOT 1
- Multiple connection HOT 2
- External downloader HOT 2
- Curl error message HOT 12
- Not displaying porgress HOT 4
- windows HOT 3
- Can't download some episodes HOT 13
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 soaper-dl.