Wonder we can use curl as copyurl when using rclone?

Copyurl is great! At the same time, downloading something requires a password(cookies/code).

Let' say we have such command as:

curl -L -C - "https://ex.com/file/c8aa26cbbhd392932?fid=286 &dstime=1666151655&rt=sh&sign=FDtAERVJouK-DCb740ccc5511e5e8fedcff06b0812&vkuuid=3196362223&file_type=0" -o "testing.zip" -A "drive.ex.com" -c"code=GtTYVFQ"

Can we make such command to work with copyurl ?

I have try

rclone copyurl "https://ex.com/file/c8aa26cbbhd392932?fid=286 &dstime=1666151655&rt=sh&sign=FDtAERVJouK-DCb740ccc5511e5e8fedcff06b0812&vkuuid=3196362223&file_type=0" -o "testing.zip" -A "drive.ex.com" -c"code=GtTYVFQ" remoteDrive:testing

without luck.

Yes, trying to work smarter with the copyurl option.

I guess a command something like this will do almost the same:

rclone copyto ":http,url='https://ex.com/file/c8aa26cbbhd392932?fid=286 &dstime=1666151655&rt=sh&sign=FDtAERVJouK-DCb740ccc5511e5e8fedcff06b0812&vkuuid=3196362223&file_type=0',headers='Cookie,code=GtTYVFQ':" remoteDrive:testing/testing.zip --user-agent "drive.ex.com"

I havn't tested much, but it does return the same error as your curl command (Connection refused).

More info here:

1 Like

You can set arbitrary HTTP headers and these should work with rclone copyurl

--header="Cookie: code=GtTYVFQ"
1 Like

Thanks, so here is simpler command doing almost the same as the curl command:

rclone copyurl "https://ex.com/file/c8aa26cbbhd392932?fid=286 &dstime=1666151655&rt=sh&sign=FDtAERVJouK-DCb740ccc5511e5e8fedcff06b0812&vkuuid=3196362223&file_type=0" remoteDrive:testing/testing.zip --user-agent="drive.ex.com" --header="Cookie: code=GtTYVFQ"
1 Like

In Linux you can pipe curl (or any other command) output to rclone using the rcat command. You'll need to manually specify the file name in which you want data to be saved in remote . Here's an example:

curl --header 'Host: freetestdata.com' --user-agent 'Mozilla' --referer 'https://freetestdata.com/audio-files/mp3/' 'https://freetestdata.com/wp-content/uploads/2021/09/Free_Test_Data_100KB_MP3.mp3' --output - | rclone rcat remote:/Free_Test_MP3.mp3

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.