diff --git a/Makefile b/Makefile index 225a848..db7c640 100644 --- a/Makefile +++ b/Makefile @@ -6,11 +6,11 @@ prefix=/usr/local bindir=$(prefix)${exec_prefix}/bin DESTDIR= FLAGS=$(CFLAGS) -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBZ=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBSSL=1 -DHAVE_LIBCRYPTO=1 -OBJ=common.o settings.o containerfiles.o outputfiles.o servicetypes.o extract_text.o download.o display.o players.o selectformat.o ehow.o ign.o youtube.o +OBJ=common.o settings.o containerfiles.o outputfiles.o servicetypes.o extract_text.o download.o display.o players.o selectformat.o ehow.o youtube.o all: $(OBJ) @cd libUseful; $(MAKE) - $(CC) $(FLAGS) -o movgrab main.c $(LIBS) $(OBJ) libUseful/libUseful.a + $(CC) $(FLAGS) -o movgrab main.c $(OBJ) libUseful/libUseful.a $(LIBS) clean: @rm -f movgrab *.o libUseful/*.o libUseful/*.a libUseful/*.so config.log config.status @@ -30,9 +30,6 @@ outputfiles.o: outputfiles.c outputfiles.h ehow.o: ehow.c ehow.h $(CC) $(FLAGS) -c ehow.c -ign.o: ign.c ign.h - $(CC) $(FLAGS) -c ign.c - youtube.o: youtube.c youtube.h $(CC) $(FLAGS) -c youtube.c @@ -58,3 +55,6 @@ extract_text.o: extract_text.c extract_text.h install: $(INSTALL) -d $(DESTDIR)$(bindir) $(INSTALL) movgrab $(DESTDIR)$(bindir) + +test: + echo "no tests" diff --git a/README b/README deleted file mode 100755 index 78b42f4..0000000 --- a/README +++ /dev/null @@ -1,11 +0,0 @@ -AUTHOR: -Movgrab and libUseful are (C) 2009 Colum Paget. They are released under the GPL so you may do anything with them that the GPL allows. - -Email: colums.projects@gmail.com -Blog: http://idratherhack.blogspot.com - - -DISCLAIMER: - This is free software. It comes with no guarentees and I take no responsiblity if it makes your computer explode or opens a portal to the demon dimensions, or does anything. - -Installation and usage instructions are now in the 'Docs' subdirectory diff --git a/common.h b/common.h index 115be57..211b1e9 100755 --- a/common.h +++ b/common.h @@ -3,7 +3,7 @@ #define MOVGRAB_COMMON //This is doable through autoconf, but I'm sick of fighting with it -#define Version "3.1.2" +#define Version "4.0" #include "libUseful/libUseful.h" #include @@ -32,6 +32,7 @@ #define FLAG_POST 262144 #define FLAG_PLAYER_AUTO 524288 #define FLAG_NOOUT 1048576 +#define FLAG_DOWNLOAD_SIZE 2097152 extern int Type, Flags; diff --git a/display.c b/display.c index a2f8229..e3af0e1 100755 --- a/display.c +++ b/display.c @@ -8,7 +8,7 @@ extern char *CmdLine, *ProgName; -int DisplayAvailableFormats(ListNode *Vars, char *Formats, int ShowSize) +int DisplayAvailableFormats(ListNode *Vars, char *Formats) { char *URL=NULL, *Token=NULL, *TokenID=NULL, *Tempstr=NULL, *ptr; STREAM *S; @@ -27,7 +27,7 @@ if (strcmp(Token,"reference") !=0) { fprintf(stderr,"%s",Token); - if (ShowSize) + if (Flags & FLAG_DOWNLOAD_SIZE) { S=STREAMOpen(URL, "H"); if (S) diff --git a/display.h b/display.h index ff4d181..a2b1d36 100755 --- a/display.h +++ b/display.h @@ -5,7 +5,7 @@ extern int DisplayTitleWidth; -int DisplayAvailableFormats(ListNode *Vars, char *Formats, int ShowSize); +int DisplayAvailableFormats(ListNode *Vars, char *Formats); void DisplayProgress(const char *FullTitle, const char *Format, double bytes_read, double DocSize, int PrintName); #endif diff --git a/ign.c b/ign.c deleted file mode 100644 index 4f4fdad..0000000 --- a/ign.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "ign.h" - -const char *IGN_DecodeLine(const char *Data, ListNode *Vars) -{ -const char *ptr; -char *Name=NULL, *Value=NULL, *URL=NULL; -int height=0, width=0; - -ptr=GetNameValuePair(Data,",",":",&Name,&Value); -while (ptr) -{ -StripQuotes(Name); -StripQuotes(Value); - -if (strcmp("url",Name)==0) URL=CopyStr(URL,Value); -if (strcmp("width",Name)==0) width=atoi(Value); -if (strcmp("height",Name)==0) height=atoi(Value); -ptr=GetNameValuePair(ptr,",",":",&Name,&Value); -} - -if (width && height && StrValid(URL)) -{ - Value=FormatStr(Value,"item:mp4:%dx%d",width,height); - SetVar(Vars,Value,URL); -} - -Destroy(Name); -Destroy(Value); -Destroy(URL); - -return(ptr); -} - -void IGN_DecodeFormats(const char *Data, ListNode *Vars) -{ -const char *ptr; -char *Token=NULL; - -ptr=strstr(Data,"{\"url\":"); -while (ptr) -{ -ptr++; -ptr=GetToken(ptr,"}",&Token,0); -IGN_DecodeLine(Token, Vars); -ptr=strstr(ptr,"{\"url\":"); -} - -Destroy(Token); -} diff --git a/ign.h b/ign.h deleted file mode 100644 index c0b07fb..0000000 --- a/ign.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef MOVGRAB_IGN -#define MOVGRAB_IGN - -#include "common.h" - - -void IGN_DecodeFormats(const char *Data, ListNode *Vars); - -#endif diff --git a/libUseful/config.log b/libUseful/config.log index 1e06f96..28e9861 100644 --- a/libUseful/config.log +++ b/libUseful/config.log @@ -10,14 +10,14 @@ generated by GNU Autoconf 2.69. Invocation command line was ## Platform. ## ## --------- ## -hostname = columPC -uname -m = x86_64 -uname -r = 5.1.15-64 +hostname = graphics +uname -m = x86 +uname -r = 4.16.13-64 uname -s = Linux -uname -v = #1 SMP Mon Jul 1 14:00:23 BST 2019 +uname -v = #388 SMP Sat Feb 23 07:27:36 UTC 2019 /usr/bin/uname -p = unknown -/bin/uname -X = unknown +/bin/uname -X = /bin/arch = unknown /usr/bin/arch -k = unknown @@ -35,34 +35,40 @@ PATH: /bin PATH: /usr/games/bin PATH: . PATH: /opt/Csound-6.05/bin -PATH: /opt/FLTK/bin -PATH: /opt/Python-2.7.13/bin +PATH: /opt/LibreCAD/bin +PATH: /opt/Python-2.7.15/bin +PATH: /opt/Python-3.5.6/bin PATH: /opt/Python-3.7.1/bin PATH: /opt/Qt5/bin PATH: /opt/SDL/bin PATH: /opt/SDL2/bin +PATH: /opt/avr/bin PATH: /opt/blender-2.79b/bin -PATH: /opt/boinc/bin +PATH: /opt/boinc_client-7.14.2/bin PATH: /opt/brlcad-7.26.4/bin PATH: /opt/games/bin -PATH: /opt/gdbm-1.14.1/bin -PATH: /opt/ghostscript-9.23/bin -PATH: /opt/git-2.17.0/bin +PATH: /opt/gdbm-1.18.1/bin +PATH: /opt/gifprogs-5.1.2/bin +PATH: /opt/git-2.20.1/bin +PATH: /opt/graphviz-2.40.1/bin +PATH: /opt/inn-2.6.2/bin PATH: /opt/lua-5.3.4/bin -PATH: /opt/lxc-3.0.1/bin +PATH: /opt/luajid-2.0.4/bin +PATH: /opt/lxc-3.0.3/bin PATH: /opt/mujs-1.0.5/bin +PATH: /opt/net_snmp-5.8/bin PATH: /opt/netpbm-10.66.02/bin PATH: /opt/opengl/bin PATH: /opt/panda3d/bin PATH: /opt/perl-5.24.1/bin -PATH: /opt/php-7.1.3/bin -PATH: /opt/qemu-2.8.1/bin -PATH: /opt/rustc-1.33.0/bin -PATH: /opt/schily/bin +PATH: /opt/qemu-2.8.1_SDL/bin +PATH: /opt/qemu-3.1.0_SDL/bin +PATH: /opt/ruby-2.5.2/bin PATH: /opt/squirrel-3.0/bin -PATH: /opt/tcl-8.6.8/bin +PATH: /opt/tcl-8.6.9/bin PATH: /opt/tinyscheme-1.41/bin -PATH: /opt/wine-3.12/bin +PATH: /opt/wine-3.21/bin +PATH: /opt/wine-4.3/bin ## ----------- ## @@ -74,7 +80,7 @@ configure:2213: found /usr/bin/gcc configure:2224: result: gcc configure:2453: checking for C compiler version configure:2462: gcc --version >&5 -gcc (GCC) 8.1.0 +gcc (GCC) 8.2.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -83,11 +89,11 @@ configure:2473: $? = 0 configure:2462: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc -COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i486-pc-linux-gnu/8.1.0/lto-wrapper +COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i486-pc-linux-gnu/8.2.0/lto-wrapper Target: i486-pc-linux-gnu -Configured with: ../gcc-8.1.0-src/configure --prefix=/usr --sysconfdir=/etc --includedir=/usr/include --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --host=i486-pc-linux-gnu --build=i486-pc-linux-gnu --target=i486-pc-linux-gnu --enable-languages=c,c++,go --disable-nls --disable-multilib +Configured with: ../gcc-8.2.0-src/configure --enable-languages=c,c++,go --disable-nls --disable-multilib --prefix=/usr --sysconfdir=/etc --includedir=/usr/include --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --host=i486-pc-linux-gnu --build=i486-pc-linux-gnu --target=i486-pc-linux-gnu Thread model: posix -gcc version 8.1.0 (GCC) +gcc version 8.2.0 (GCC) configure:2473: $? = 0 configure:2462: gcc -V >&5 gcc: error: unrecognized command line option '-V' @@ -306,7 +312,7 @@ configure:4379: $? = 0 configure:4388: result: yes configure:4406: checking for OpenSSL_add_all_algorithms configure:4406: gcc -o conftest -g -O2 conftest.c -lcrypto -lssl -lc -lc -lc -lc -lc -lc -lc -lc >&5 -/tmp/cc6pj4xE.o: In function `main': +/usr/lib/gcc/i486-pc-linux-gnu/8.2.0/../../../../i486-pc-linux-gnu/bin/ld: /tmp/ccKZxT6X.o: in function `main': /home/colum/movgrab/libUseful/conftest.c:63: undefined reference to `OpenSSL_add_all_algorithms' collect2: error: ld returned 1 exit status configure:4406: $? = 1 @@ -392,7 +398,7 @@ configure:4406: $? = 0 configure:4406: result: yes configure:4406: checking for EVP_rc5_32_12_16_cbc configure:4406: gcc -o conftest -g -O2 conftest.c -lcrypto -lssl -lc -lc -lc -lc -lc -lc -lc -lc >&5 -/tmp/ccCXjw2k.o: In function `main': +/usr/lib/gcc/i486-pc-linux-gnu/8.2.0/../../../../i486-pc-linux-gnu/bin/ld: /tmp/ccwSLpQF.o: in function `main': /home/colum/movgrab/libUseful/conftest.c:66: undefined reference to `EVP_rc5_32_12_16_cbc' collect2: error: ld returned 1 exit status configure:4406: $? = 1 @@ -497,7 +503,7 @@ configure:4406: $? = 0 configure:4406: result: yes configure:4406: checking for SSL_set_tlsext_host_name configure:4406: gcc -o conftest -g -O2 conftest.c -lcrypto -lssl -lc -lc -lc -lc -lc -lc -lc -lc >&5 -/tmp/cceS7RX5.o: In function `main': +/usr/lib/gcc/i486-pc-linux-gnu/8.2.0/../../../../i486-pc-linux-gnu/bin/ld: /tmp/ccC5S1Iu.o: in function `main': /home/colum/movgrab/libUseful/conftest.c:73: undefined reference to `SSL_set_tlsext_host_name' collect2: error: ld returned 1 exit status configure:4406: $? = 1 @@ -604,7 +610,7 @@ generated by GNU Autoconf 2.69. Invocation command line was CONFIG_COMMANDS = $ ./config.status -on columPC +on graphics config.status:728: creating Makefile diff --git a/main.c b/main.c index fbcbab3..8c5a069 100755 --- a/main.c +++ b/main.c @@ -96,6 +96,7 @@ while (1) { fprintf(stderr,"Checking %-20s ",Curr->Tag); fflush(NULL); + LibUsefulSetValue("Error:Silent", "Y"); } diff --git a/selectformat.c b/selectformat.c index 8b2ba29..775f3d2 100644 --- a/selectformat.c +++ b/selectformat.c @@ -42,7 +42,7 @@ return(FALSE); //this function compares the video formats found on the page to the list of //preferences expressed by the user with the '-f' flag, and contained in the //global variable 'Settings.FormatPreference' -int SelectDownloadFormat(ListNode *Vars, int WebsiteType, int DisplaySize) +int SelectDownloadFormat(ListNode *Vars, int WebsiteType) { ListNode *Curr; char *ptr, *Tempstr=NULL, *Fmt=NULL, *FmtID=NULL, *Selected=NULL, *p_ItemFormat; @@ -53,7 +53,7 @@ Tempstr=GatherMatchingFormats(Tempstr,"",Vars); { for (i=0; i < 3; i++) { - if (DisplayAvailableFormats(Vars, Tempstr, DisplaySize)) break; + if (DisplayAvailableFormats(Vars, Tempstr)) break; //printf("Connection Refused, sleeping for 20 secs before retry\n"); //sleep(10); break; diff --git a/selectformat.h b/selectformat.h index 9604ca6..ebe45ba 100644 --- a/selectformat.h +++ b/selectformat.h @@ -3,6 +3,6 @@ #include "common.h" -int SelectDownloadFormat(ListNode *Vars, int WebsiteType, int DisplaySize); +int SelectDownloadFormat(ListNode *Vars, int WebsiteType); #endif diff --git a/servicetypes.c b/servicetypes.c index 3fd89d6..a692938 100755 --- a/servicetypes.c +++ b/servicetypes.c @@ -2,7 +2,6 @@ #include "containerfiles.h" #include "selectformat.h" #include "download.h" -#include "ign.h" #include "youtube.h" #include "settings.h" @@ -18,7 +17,7 @@ Then site specific //Site type names used at the command line etc -char *DownloadTypes[]={"none","generic","youtube","youtu.be","metacafe","dailymotion","break","ehow","vimeo","ted","reuters","liveleak","photobucket","washingtonpost","cbsnews","france24","euronews","metatube","guardian","redorbit","uctv.tv","dotsub","astronomy.com","discovery","bloomberg","nationalgeographic","videobash","smh","funnyordie","ign","ebaumsworld","gamestar","imdb","charlierose","stanfordoc","screencast.com","royalsociety.tv",NULL}; +char *DownloadTypes[]={"none","generic","youtube","youtu.be","metacafe","dailymotion","break","vimeo","ted","reuters","liveleak","photobucket","washingtonpost","cbsnews","france24","euronews","metatube","guardian","redorbit","uctv.tv","dotsub","astronomy.com","discovery","bloomberg","nationalgeographic","smh","ebaumsworld","imdb","charlierose","stanfordoc","screencast.com","royalsociety.tv","bitchute",NULL}; //Longer names used in display char *DownloadNames[]={"none", @@ -28,7 +27,6 @@ char *DownloadNames[]={"none", "Metacafe: http://www.metacafe.com", "Daily Motion: http://www.dailymotion.com", "www.break.com", -"www.ehow.com", "www.vimeo.com", "www.ted.com", "Reuters: http://www.reuters.com/", @@ -47,29 +45,25 @@ char *DownloadNames[]={"none", "dsc.discovery.com", "www.bloomberg.com (not bloomberg.tv)", "National Geographic (http://video.nationalgeographic.com)", -"videobash", "Sidney Morning Herald", -"Funny or Die (http://www.funnyordie.com)", -"IGN", "Ebaums World", -"www.gamestar.de", "www.imdb.com", "Charlie Rose", "Stanford Open Classroom", "UDemy", "http://royalsociety.org/", +"BitChute", NULL}; //"http://vimeo.com/33204284", //links used by the -test-sites feature to test if a download site still //works with movgrab char *TestLinks[]={"", "", -"http://www.youtube.com/watch?v=Vxp3seoRNgY", -"http://youtu.be/OdrEId7YI1k", +"https://www.youtube.com/watch?v=GrK9EaQRp2I", +"http://youtu.be/mvEPnhmtXY0", "http://metacafe.com/watch/11419763/super-blood-moon-eclipse-2015/", "http://www.dailymotion.com/video/x5790e_hubblecast-16-galaxies-gone-wild_tech", "http://www.break.com/video/break-compilations-2591623/cats-vs-the-world-iii-breaking-videos-3075295", -"http://www.ehow.com/video_6819748_creamy-thyme-scrambled-eggs-recipe.html", "broken", "http://www.ted.com/talks/janine_benyus_shares_nature_s_designs.html", "http://www.reuters.com/video/2016/05/02/foam-swords-drawn-in-mass-play-fight-in?videoId=368328211", @@ -78,8 +72,8 @@ char *TestLinks[]={"", "", "http://www.washingtonpost.com/video/politics/tom-prices-tense-senate-finance-hearing/2017/01/24/f0c35346-e282-11e6-a419-eefe8eff0835_video.html", "http://www.cbsnews.com/video/watch/?id=7357739n", "http://www.france24.com/en/20160430-down-earth-fast-fashion-pollution-environment-ethical-consumption", -"http://www.euronews.com/news/bulletin/", -"http://www.metatube.com/en/videos/cid2/Funny-Videos/53210/Rail-Jump-Fail/", +"https://www.euronews.com/2019/06/27/astronaut-luca-parmitano-chronicles-his-mission-for-euronews", +"https://www.metatube.com/en/videos/266906/Ex-Machina-Movie-TRAILER-2-2015/", "http://www.guardian.co.uk/world/video/2011/may/13/fukushima-radiation-dairy-farmers-video", "http://www.redorbit.com/video/using-f1-technology-to-transform-healthcare-012016/", "http://www.uctv.tv/search-details.aspx?showID=20888", @@ -88,18 +82,15 @@ char *TestLinks[]={"", "", "http://dsc.discovery.com/videos/how-the-universe-works-birth-of-a-black-hole.html", "http://www.bloomberg.com/video/72477250/", "http://video.nationalgeographic.com/video/environment/environment-natural-disasters/earthquakes/earthquake-101/", -"http://www.videobash.com/video_show/wing-suit-amazing-footage-6086", "http://www.smh.com.au/technology/sci-tech/newly-discovered-planets-include-superearth-20110913-1k7tl.html", -"http://www.funnyordie.com/videos/032785be3a/genie-on-hard-times-with-parker-posey?playlist=featured_videos", -"http://www.ign.com/videos/2013/06/05/the-last-of-us-review", -"http://www.ebaumsworld.com/videos/a-giant-python-opens-the-door/83367677/", -"http://www.gamestar.de/videos/trailer,3/hobbit-3-die-schlacht-der-fuenf-heere,76110.html", +"https://www.ebaumsworld.com/videos/spacex-released-a-blooper-reel-of-all-their-failed-flights-and-landings/85465411/", "http://www.imdb.com/video/imdb/vi3832131865", "https://charlierose.com/videos/27996", "http://openclassroom.stanford.edu/MainFolder/VideoPage.php?course=PracticalUnix&video=wget&speed=100", "http://www.brainstuffshow.com/videos/how-gps-coordinates-work-video.htm", //"http://royalsociety.tv/rsPlayer.aspx?presentationid=474", "broken", +"https://www.bitchute.com/video/v_UdkNgeuRY/", NULL}; @@ -138,10 +129,6 @@ else if (strcmp(Server,"www.break.com")==0) { Type=TYPE_BREAK_COM; } -else if (strstr(Server,".ehow.")) -{ - Type=TYPE_EHOW; -} else if (strcmp(Server,"www.dailymotion.com")==0) { Type=TYPE_DAILYMOTION; @@ -234,18 +221,6 @@ else if (strstr(Server,"bloomberg.com")) { Type=TYPE_BLOOMBERG; } -else if (strstr(Server,"www.videobash.com")) -{ - Type=TYPE_VIDEOBASH; -} -else if (strstr(Server,"funnyordie.com")) -{ - Type=TYPE_FUNNYORDIE; -} -else if (strstr(Server,".ign.")) -{ - Type=TYPE_IGN; -} else if (strstr(Server,".imdb.com")) { Type=TYPE_IMDB; @@ -254,10 +229,6 @@ else if (strstr(Server,".ebaumsworld.com")) { Type=TYPE_EBAUMSWORLD; } -else if (strstr(Server,".gamestar.de")) -{ - Type=TYPE_GAMESTAR; -} else if (strstr(Server,"charlierose.com")) { Type=TYPE_CHARLIEROSE; @@ -274,6 +245,10 @@ else if (strstr(Server,"screencast.com")) { Type=TYPE_SCREENCAST_COM; } +else if (strstr(Server,"bitchute.com")) +{ + Type=TYPE_BITCHUTE; +} @@ -548,6 +523,7 @@ case TYPE_BREAK_COM: RetVal=DownloadPage(Tempstr,TYPE_BREAK_STAGE2,Title,Flags); break; + case TYPE_VIMEO: RetVal=DownloadPage(GetVar(Vars,"ID"),TYPE_VIMEO_STAGE2,Title,Flags); break; @@ -584,11 +560,6 @@ case TYPE_BLOOMBERG: RetVal=DownloadItem(Tempstr, Title, Fmt, Flags); break; -case TYPE_IGN: - Tempstr=SubstituteVarsInString(Tempstr,"http://apis.ign.com/video/v3/videos/$(ID)",Vars,0); - RetVal=DownloadPage(Tempstr,TYPE_IGN_STAGE2, Title,Flags); -break; - case TYPE_IMDB: Tempstr=SubstituteVarsInString(Tempstr,"http://www.imdb.com/video/imdb/vi$(ID)/imdb/single",Vars,0); RetVal=DownloadPage(Tempstr,TYPE_IMDB_STAGE2, Title,Flags); @@ -601,12 +572,6 @@ case TYPE_REUTERS: break; -case TYPE_GAMESTAR: - Tempstr=SubstituteVarsInString(Tempstr,"http://gamestar.de/_misc/videos/portal/getVideoUrl.cfm?premium=0&videoId=$(ID)",Vars,0); - RetVal=DownloadItem(Tempstr, Title, Fmt, Flags); -break; - - case TYPE_STANFORD_OPENCLASS: Tempstr=SubstituteVarsInString(Tempstr,"http://openclassroom.stanford.edu/MainFolder/courses/$(course)/videos/$(ID).xml",Vars,0); Title=SubstituteVarsInString(Title,"$(course)-$(ID)",Vars,0); @@ -614,7 +579,7 @@ case TYPE_STANFORD_OPENCLASS: RetVal=DownloadPage(Tempstr,TYPE_STANFORD_STAGE2, Title,Flags); break; - +case TYPE_BITCHUTE: case TYPE_DOTSUB: case TYPE_GENERIC: case TYPE_TED: @@ -634,23 +599,23 @@ case TYPE_DISCOVERY: case TYPE_REDORBIT_STAGE2: case TYPE_ASTRONOMYCOM_STAGE2: case TYPE_BREAK_STAGE2: -case TYPE_IGN_STAGE2: case TYPE_IMDB_STAGE2: case TYPE_STANFORD_STAGE2: case TYPE_REUTERS_STAGE2: -case TYPE_FUNNYORDIE: case TYPE_EBAUMSWORLD: case TYPE_DAILYMOTION: -case TYPE_VIDEOBASH: case TYPE_SCREENCAST_COM: -case TYPE_EHOW: case TYPE_CHARLIEROSE: case TYPE_CONTAINERFILE_PLS: case TYPE_CONTAINERFILE_ASX: case TYPE_CONTAINERFILE_M3U8: Tempstr=CopyStr(Tempstr, GetVar(Vars,"ID")); + if (strncmp(Tempstr, "https://www.youtube.com/",24)==0) RetVal=GrabMovie(Tempstr, TYPE_YOUTUBE); + else + { if ((strncmp(Tempstr,"icy:",4)!=0) && (strncmp(Tempstr,"http:",5)!=0) && (strncmp(Tempstr,"https:",6)!=0)) Tempstr=MCopyStr(Tempstr,"http:",GetVar(Vars,"ID"),NULL); RetVal=DownloadItem(Tempstr, Title, Fmt, Flags); + } break; } @@ -891,25 +856,6 @@ case TYPE_BREAK_STAGE2: } break; -case TYPE_EHOW: -#define EHOW_LINE "property=\"og:video\"" -#define EHOW_ITEM "source=" -#define EHOW_ITEM_END "&" -#define EHOW_TITLE "

" -#define EHOW_TITLE_END "

" - - if (strstr(Tempstr,EHOW_LINE)) - { - GenericExtractFromLine(Tempstr, "item:flv",EHOW_ITEM,EHOW_ITEM_END,Vars,EXTRACT_DEQUOTE | EXTRACT_NOSPACES); - } - - ptr=strstr(Tempstr,EHOW_TITLE); - if (ptr) - { - GenericExtractFromLine(Tempstr, "Title",EHOW_TITLE,EHOW_TITLE_END,Vars,EXTRACT_DEQUOTE); - } -break; - case TYPE_VIMEO: @@ -1235,6 +1181,20 @@ case TYPE_BLOOMBERG: } break; +case TYPE_BITCHUTE: +#define BITCHUTE_ITEMSTART "" +#define BITCHUTE_TITLE_END "' Set max width of item title in progress display (De fprintf(stdout,"'-np ' File to write current title to. Useful as 'now playing' for internet radio streams\n"); fprintf(stdout,"'-t' specifies website type.\n"); fprintf(stdout,"'-r' Resume download (only works when writing a single file, not with +o).\n"); +fprintf(stdout,"'-s' Display sizes of available media (this slows things down a bit).\n"); fprintf(stdout,"'-f' specifies preferred video/audio formats for sites that offer more than one\n"); fprintf(stdout," example: flv:640x480,flv,mp4,mp3\n"); fprintf(stdout," Use -T to get a list of formats the site offers\n"); @@ -200,6 +201,7 @@ for (i=1; i < argc; i++) else if (strcmp(argv[i],"-w")==0) Flags |= FLAG_STDIN; else if (strcmp(argv[i],"-dt")==0) DisplayTitleWidth=atoi(argv[++i]); else if (strcmp(argv[i],"-np")==0) Settings.NowPlayingFile=CopyStr(Settings.NowPlayingFile, argv[++i]); + else if (strcmp(argv[i],"-s")==0) Flags |= FLAG_DOWNLOAD_SIZE; else if (strcmp(argv[i],"-st")==0) Settings.STREAMTimeout=atoi(argv[++i]); else if (strcmp(argv[i],"-P")==0) SetPlayer(argv[++i]); else if (strcmp(argv[i],"-Pp")==0) Settings.PlayerLaunchPercent=atoi(argv[++i]); @@ -215,15 +217,12 @@ for (i=1; i < argc; i++) Flags |= FLAG_TEST_SITES | FLAG_QUIET; for (j=1; TestLinks[j] !=NULL; j++) { - if (StrLen(TestLinks[j])) ListAddNamedItem(DL_List,DownloadTypes[j],CopyStr(NULL,TestLinks[j])); + if (StrValid(TestLinks[j])) ListAddNamedItem(DL_List,DownloadTypes[j],CopyStr(NULL,TestLinks[j])); } Settings.ItemSelectArg=CopyStr(Settings.ItemSelectArg,"0"); } - else - { - ListAddItem(DL_List, CopyStr(NULL,argv[i])); - } + else ListAddItem(DL_List, CopyStr(NULL,argv[i])); }