JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 25.11.2017, 04:53
madmax2 madmax2 is offline
JD VIP
 
Join Date: Sep 2009
Posts: 416
Cool packagiser - multiple downloadurls

I would like to create a packagiser rule e.g VideoStream

where the Downloadurl can contain any number of video streaming sites

e.g.
Downloadurl contains

*youtube* OR *dailymotion* OR *vevo* etc..

I have tried writing the rule like this

*youtube*, *dailymotion*, *vevo*

Regex
*youtube*|*dailymotion* | *vevo*

Unfortunately none of this works or is considered valid..

Can someone please help?
Reply With Quote
  #2  
Old 25.11.2017, 06:04
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

regex you can not use * as wildcard, in regex its used as repeat character (0 to many)
Code:
youtube|dailymotion|vevo
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #3  
Old 26.11.2017, 01:11
madmax2 madmax2 is offline
JD VIP
 
Join Date: Sep 2009
Posts: 416
Default

Quote:
Originally Posted by raztoki View Post
regex you can not use * as wildcard, in regex its used as repeat character (0 to many)
Code:
youtube|dailymotion|vevo
oic, didn't know that..

thanks..
regex is quite complex, learning something new every day..

So is the wildcard in regex = ?

Regex = a?b
matches = aaab, aaaaaaaab

Real Example..

regex = ?youtube?

matches

Code:
**External links are only visible to Support Staff**www.youtube.com
youtube.com
youtube.com/?sklajdlksaj
youtubessssss.com

Last edited by madmax2; 26.11.2017 at 01:19.
Reply With Quote
  #4  
Old 26.11.2017, 01:47
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

question mark character in regex is used as a 'may or may not be present'. Working example: 'a{0,1}b == a?b' will match b and ab

try googling for some regex materials, this website isn't bad _**External links are only visible to Support Staff**
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 26.11.2017 at 09:30.
Reply With Quote
  #5  
Old 26.11.2017, 05:40
madmax2 madmax2 is offline
JD VIP
 
Join Date: Sep 2009
Posts: 416
Default

Quote:
Originally Posted by raztoki View Post
question mark character in regex is used as a may or may not pre present situation. Working example: 'a{0,1}b == a?b' will match b and ab

try googling for some regex materials, this website isn't bad _**External links are only visible to Support Staff**
Just to clarify, but is the ? (question mark) a wildcard in regex?


So does this example is valid or not?

Regex = a?b
matches = aaab, aaaaaaaab

Real Example..

regex = ?youtube?

matches

Code:
**External links are only visible to Support Staff**www.youtube.com
youtube.com
youtube.com/?sklajdlksaj
youtubessssss.com

====

what website?
all I see is this

_**External links are only visible to Supporters**

Why does jdownloader forum hide links?
it is very annoying when I try to use some website examples
and it hides it, had to a added a code tag.
Reply With Quote
  #6  
Old 26.11.2017, 07:34
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,507
Default

In regular expressions, the period (., also called "dot") is the wildcard pattern which matches a single character. Combined with the asterisk operator .* it will match any number of characters.

So try .*?youtube.*

The hidden link: regex101.com
__________________
FAQ: How to upload a Log
Reply With Quote
  #7  
Old 26.11.2017, 08:56
madmax2 madmax2 is offline
JD VIP
 
Join Date: Sep 2009
Posts: 416
Default

Quote:
Originally Posted by tony2long View Post
In regular expressions, the period (., also called "dot") is the wildcard pattern which matches a single character. Combined with the asterisk operator .* it will match any number of characters.

So try .*?youtube.*

The hidden link: regex101.com
okay I tried the website and the regex you gave..
it looks like you don't need the question mark..why did you add it to beginning but not the end of that regex?

e.g.
.*?youtube.*?

this regex matches the 5 example links I posted above

.*youtube.*

====

also why does the forum hide links?
Reply With Quote
  #8  
Old 26.11.2017, 09:33
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

if you use contains field you do not need to use wildcards, as its already a partial match, only need to use it for equals. so the example in post 2 is correct, though can be open to false positives eg. abcefg.com/youtube/something.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #9  
Old 27.11.2017, 13:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

Quote:
Originally Posted by madmax2 View Post
also why does the forum hide links?
Non whitelisted URLs are only visible to staff/support members
__________________
JD-Dev & Server-Admin
Reply With Quote
  #10  
Old 27.11.2017, 15:36
madmax2 madmax2 is offline
JD VIP
 
Join Date: Sep 2009
Posts: 416
Default

Quote:
Originally Posted by Jiaz View Post
Non whitelisted URLs are only visible to staff/support members
Yeah that is what the messages saids

it does not explain the reason why though...

Is it you are concern that people might post illegal download links?
Reply With Quote
  #11  
Old 27.11.2017, 16:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

Many reasons. For example privacy of users, because some ppl simply post urls to screenshots/pastebins with personal information. Keep scanners away and avoid legal trouble with links to content
__________________
JD-Dev & Server-Admin
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 18:18.
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.