patrickkfkan / patreon-dl

Patreon Downloader
53 stars 3 forks source link

Not an issue #13

Closed tnmdynamiq closed 3 months ago

tnmdynamiq commented 3 months ago

Hey Patrick,

Sorry to bother you, but I don't know of any other way to contact you regarding a feature request. I was wondering if there's a way to incorporate a feature in the config.json to list multiple target URLs that I frequently download from. This would automate the selection process, removing the need to manually uncomment the URLs in the config, which can be a bit of a hassle. It would be a great convenience to just update the cookie when necessary and have "patreon-dl" cycle through the predefined list of URLs.

patrickkfkan commented 3 months ago

I think maybe add an option to read URLs from a file?

patrickkfkan commented 3 months ago

Implemented in v1.3.0. Please test.

Closing this now as resolved. If you find an issue with the implementation, feel free to start a new issue.

tnmdynamiq commented 3 months ago

Will make an attempt to do that today, Thank you so much!

tnmdynamiq commented 3 months ago

Implemented in v1.3.0. Please test.

Closing this now as resolved. If you find an issue with the implementation, feel free to start a new issue.

Just wanted to clarify, are you saying rather than uncommenting each show as I download them, I can now perform the same action without manual intervention using a list? Normally I uncomment each show one by one in my config:

[downloader]
target.url = https://www.patreon.com/showname1/posts
# target.url = https://www.patreon.com/showname2/posts
# target.url = https://www.patreon.com/showname3/posts
# target.url = https://www.patreon.com/showname4/posts
# target.url = https://www.patreon.com/showname5/posts
# target.url = https://www.patreon.com/showname6/posts

use.status.cache = 1
no.prompt = 1
path.to.ffmpeg = /opt/homebrew/opt/ffmpeg@4/bin/ffmpeg

[output]
out.dir = /Volumes/SMH
campaign.dir.name.format = "{creator.vanity}[ - ]?{campaign.name}"
content.dir.name.format = "{content.id}[ - ]?{content.name}"
media.filename.format = "{media.filename}"

[include]
locked.content = 1
posts.with.media.type = audio
campaign.info = 1
content.info = 1
content.media = audio

[request]
max.retries = 3
max.concurrent = 10
min.time = 33

[logger.console]
enabled = 1
log.level = info
include.date.time = 1
include.level = 1
include.originator = 1
include.error.stack = 0
date.time.format = "mmm dd HH:MM:ss"
color = 1

Please provide an example of what I can change to make it check all of the shows at once if that's the case? PS, is there anyway I can donate to you?

patrickkfkan commented 3 months ago

Ok, so instead of this in your conf:

[downloader]
target.url = https://www.patreon.com/showname1/posts
# target.url = https://www.patreon.com/showname2/posts
# target.url = https://www.patreon.com/showname3/posts
# target.url = https://www.patreon.com/showname4/posts
# target.url = https://www.patreon.com/showname5/posts
# target.url = https://www.patreon.com/showname6/posts

You would do this:

target.url = "https://www.patreon.com/showname1/posts, https://www.patreon.com/showname2/posts, https://www.patreon.com/showname3/posts ..."

Ideally, the conf should support mult-line / multiple entries with same key, but it doesn't because of .ini style restrictions. This would make target.url quite lengthy if you have lots of URLs. So instead of having them all in one comma-separated line, you can have the following in your conf:

[downloader]
target.url = urls.txt

And then you have a separate file urls.txt:

https://www.patreon.com/showname2/posts
https://www.patreon.com/showname3/posts
https://www.patreon.com/showname4/posts
https://www.patreon.com/showname5/posts
https://www.patreon.com/showname6/posts

# You can still comment out lines here, e.g.:
# https://www.patreon.com/showname7/posts

If you want to donate, you can find the sponsor button on the main page of this repo. Thanks!

tnmdynamiq commented 3 months ago

Ok, so instead of this in your conf:

[downloader]
target.url = https://www.patreon.com/showname1/posts
# target.url = https://www.patreon.com/showname2/posts
# target.url = https://www.patreon.com/showname3/posts
# target.url = https://www.patreon.com/showname4/posts
# target.url = https://www.patreon.com/showname5/posts
# target.url = https://www.patreon.com/showname6/posts

You would do this:

target.url = "https://www.patreon.com/showname1/posts, https://www.patreon.com/showname2/posts, https://www.patreon.com/showname3/posts ..."

Ideally, the conf should support mult-line / multiple entries with same key, but it doesn't because of .ini style restrictions. This would make target.url quite lengthy if you have lots of URLs. So instead of having them all in one comma-separated line, you can have the following in your conf:

[downloader]
target.url = urls.txt

And then you have a separate file urls.txt:

https://www.patreon.com/showname2/posts
https://www.patreon.com/showname3/posts
https://www.patreon.com/showname4/posts
https://www.patreon.com/showname5/posts
https://www.patreon.com/showname6/posts

# You can still comment out lines here, e.g.:
# https://www.patreon.com/showname7/posts

If you want to donate, you can find the sponsor button on the main page of this repo. Thanks!

Excellent Thank you so much!

tnmdynamiq commented 3 months ago

Ok, so instead of this in your conf:

[downloader]
target.url = https://www.patreon.com/showname1/posts
# target.url = https://www.patreon.com/showname2/posts
# target.url = https://www.patreon.com/showname3/posts
# target.url = https://www.patreon.com/showname4/posts
# target.url = https://www.patreon.com/showname5/posts
# target.url = https://www.patreon.com/showname6/posts

You would do this:

target.url = "https://www.patreon.com/showname1/posts, https://www.patreon.com/showname2/posts, https://www.patreon.com/showname3/posts ..."

Ideally, the conf should support mult-line / multiple entries with same key, but it doesn't because of .ini style restrictions. This would make target.url quite lengthy if you have lots of URLs. So instead of having them all in one comma-separated line, you can have the following in your conf:

[downloader]
target.url = urls.txt

And then you have a separate file urls.txt:

https://www.patreon.com/showname2/posts
https://www.patreon.com/showname3/posts
https://www.patreon.com/showname4/posts
https://www.patreon.com/showname5/posts
https://www.patreon.com/showname6/posts

# You can still comment out lines here, e.g.:
# https://www.patreon.com/showname7/posts

If you want to donate, you can find the sponsor button on the main page of this repo. Thanks!

Excellent Thank you so much!

It seems to be working as intended, which is much appreciated thank you again! I would like to address some things that make it a little confusing if its ran unattended. So after each download cycle I see something like this usually info: PostDownloader: Total 0 / 77 posts processed (skipped: 30 redundant, 47 with unmet media type criteria) The issue is I only see it for the most post section/show downloaded and the log above it. Unless I am debugging it, I only really need that message to know what has been downloaded. Anyway to just get that message for each target url unless otherwise specified in the config?

patrickkfkan commented 3 months ago

I save log files, so for me it's pretty easy to just tail the created logs to get the summary for each URL. I can collate those lines for each target and print them out at the end. Will that work for you?

tnmdynamiq commented 3 months ago

I save log files, so for me it's pretty easy to just tail the created logs to get the summary for each URL. I can collate those lines for each target and print them out at the end. Will that work for you?

Oh that's a good point, yeah that will work for me. Thank you

patrickkfkan commented 2 months ago

Updated v1.4.0. This version prints the summary for all target URLs at the end. Please test.

tnmdynamiq commented 2 months ago

Updated v1.4.0. This version prints the summary for all target URLs at the end. Please test.

Will do shortly & keep you updated. Thank you!

tnmdynamiq commented 2 months ago

Updated v1.4.0. This version prints the summary for all target URLs at the end. Please test.

Sorry for the late response, you nailed it! Thank you again, I sincerely appreciate it!

patrickkfkan commented 2 months ago

You're welcome, and thanks for the support!

tnmdynamiq commented 2 months ago

You're welcome, and thanks for the support!

My pleasure, you deserve it! Sorry I didn't sooner. I meant too but had something come up and forgot.