JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 31.10.2022, 18:05
theJoXs theJoXs is offline
Modem User
 
Join Date: Oct 2022
Posts: 2
Default Automatically get newest ARDAudiothek.de podcast, folderwatch, filter .mp3

Dear all,

I am struggling with automating a weekly task: to download a new podcast episode from the ARD audiothek.

The podcast: **External links are only visible to Support Staff****External links are only visible to Support Staff**

Jdownloader can pickup the new episode, if we use the ‘Add New links’ in the LinkGrabber tab. Example to new episode:

**External links are only visible to Support Staff****External links are only visible to Support Staff**

The link to the new episode can be found in the source code of the main page. I can probably write a short Python script to extract the information. And store it in a .crawljob file.

However, I am struggling getting folderwatch to work in this context. An example file could be:

enabled=TRUE
text=**External links are only visible to Support Staff** packageName="Kalk & Welk"
filename=2022-20-31 - newest episode.mp3
comment=SuperUsefulComment
autoConfirm=TRUE
autoStart=TRUE
extractAfterDownload=FALSE
forcedStart=FALSE
deepAnalyseEnabled=True
downloadFolder=path\to\download\dir

The deepAnalyseEnabled is necessary to get the file. However, doing so I also extract alot of image files, etc. Which are also named like the filename given above. Is it possible to filter for .mp3 files first and only download mp3 and/or rename the downloaded files after applying the filter?

Or is there even an easier way to download the newest episode automatically?
Thanks for any help!
Reply With Quote
  #2  
Old 31.10.2022, 18:19
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,922
Default

Hallo,
ich bin mal so frei und antworte auf Deutsch.
Es gibt hier mehrere Hürden/Probleme:

1. Wir haben kein Plugin für "ardaudiothek.de".
2. Aus diesem Grund müsstest du hier erstmal mindestens eine LinkCrawler Regel erstellen, die die .mp3 Links für einzelne Episoden findet und ggf. noch eine, die alle Episodenlinks einer Sendung findet, siehe:
https://support.jdownloader.org/Know...kcrawler-rules
--> Dies würde auch gleich dein Problem beheben, dass JD neben der mp3 noch anderen Kram findet

3. Sobald du entweder die besagten Regeln erstellt hast oder ein Plugin für "ardaudiothek.de" existiert, kannst du mit FolderWatch fortfahren.
Die Benennung des Files kommt erst ganz am Ende daher hab ich diese in meiner Antwort bewusst ausgelassen.

Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #3  
Old 02.11.2022, 12:33
theJoXs theJoXs is offline
Modem User
 
Join Date: Oct 2022
Posts: 2
Default

Vorab, vielen Dank dass du dir die Zeit nimmst so ausführlich zu antworten (und das an einem Sonntag ).

Ich habe mir nun mal genauer angeschaut welche Regeln es benötigt, und mich dazu entschlossen dass es ohne JDownloader doch schneller geht (da ich nur den einen PodCast archivieren möchte und ich leider keine Erfahrung mit dem programmieren eines Plugins habe).

Falls jemand interessiert daran ist, wie man die mp3 datei aus der Audiothek "extrahieren" kann:

Auf der Hauptseite des Podcasts (**External links are only visible to Support Staff****External links are only visible to Support Staff**) kann ein json file ausgelesen werden. Dieses funktioniert als eine Art feed, enthält also alle Episoden, Meta Info für jede Episode und den Downloadlink dazu.

Da es ein bisschen mühsam ist, das dictionary aus dem json file zu entschlüsseln, hänge ich mal ein paar Zeilen Python code an (also wie ich vorgegangen bin; es geht sicher eleganter). Vielleicht hilft es jemanden der das Thema findet:

Code:
from urllib.request import urlopen
from bs4 import BeautifulSoup
import json
import requests
page = urlopen('**External links are only visible to Support Staff**)
html = page.read().decode("utf-8")
soup = BeautifulSoup(html, "html.parser")
res = soup.find('script', type='application/json')
json_object = json.loads(res.contents[0]) # load the json file
all_eps = json_object['props']['pageProps']['initialData']['data']['result']['items']['nodes'] # damit bekommen wir eine Liste aller Episoden
current_ep = all_eps[0] # gibt nur den ersten Eintrag und damit die neuste Episode
download_link = current_ep['audios'][0]['url']

Danke nochmals für deine Hilfe und die Erläuterung!
Reply With Quote
  #4  
Old 02.11.2022, 15:33
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,922
Default

Quote:
Originally Posted by theJoXs View Post
Vorab, vielen Dank dass du dir die Zeit nimmst so ausführlich zu antworten (und das an einem Sonntag ).
*Montag :D
Hattest du einen Brückentag?

Quote:
Originally Posted by theJoXs View Post
Auf der Hauptseite des Podcasts (**External links are only visible to Support Staff****External links are only visible to Support Staff**) kann ein json file ausgelesen werden. Dieses funktioniert als eine Art feed, enthält also alle Episoden, Meta Info für jede Episode und den Downloadlink dazu.
In diesem Fall hätte dann sogar eine DEEPDECRYPT LinkCrawler Regel gereicht, da die Direktlinks aller Episoden bereits in der "Sendungsübersicht" im html code/json stehen.

Quote:
Originally Posted by theJoXs View Post
Da es ein bisschen mühsam ist, das dictionary aus dem json file zu entschlüsseln, hänge ich mal ein paar Zeilen Python code an (also wie ich vorgegangen bin; es geht sicher eleganter). Vielleicht hilft es jemanden der das Thema findet:
Mit Python lässt sich sowas schon sehr eleganz in ein paar Zeilen verpacken

Quote:
Originally Posted by theJoXs View Post
Danke nochmals für deine Hilfe und die Erläuterung!
Gerne.

Da ein Crawler für diese Webseite wohl auch anderen Usern helfen könnte, werde ich später eines hinzufügen.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #5  
Old 02.11.2022, 16:20
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,922
Default

Crawler Plugin hinzugefügt.

Falls ardaudiothek.de noch weitere Domains hat lass mich das gerne wissen dann baue ich die ebenfalls ein.
Es werden sowohl einzelne Episoden als auch vollständige Podcasts/"Programme" unterstützt.

Bitte auf das nächste CORE-Update warten!

Please wait for the next CORE-Update!

Wartest du auf einen angekündigten Bugfix oder ein neues Feature?
Updates werden nicht immer sofort bereitgestellt!
Bitte lies unser Update FAQ! | Please read our Update FAQ!

---
Are you waiting for recently announced changes to get released?
Updates to not necessarily get released immediately!
Bitte lies unser Update FAQ! | Please read our Update FAQ!


-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #6  
Old 16.11.2022, 20:07
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,922
Default

CORE-Updates have been released!
All announced bugfixes and features are live!
Please update your JDownloader and report any issues you find asap.
If this thread gets marked as "[Solved]" by our forum staff you can still post in it and we will read- and reply to it!

CORE-Updates wurden released!
Alle angekündigten Bugfixes/Features sind nun verfügbar!
Bitte JDownloader updaten und eventuelle Bugs schnellstmöglich an uns melden.
Falls dieser Thread vom Team als "[Erledigt]" markiert wird, kannst du weiterhin darin antworten und wir lesen/beantworten auch solche Threads!

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 12:49.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.