crunchy-xml-decoder icon indicating copy to clipboard operation
crunchy-xml-decoder copied to clipboard

autocatch link

Open rcyclope opened this issue 8 years ago • 9 comments

add few line in crunchy-xml-decode.py

...
import re, urllib2
...
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#(autocatch)#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
def autocatch():
    print 'indicate the url : '
    url=raw_input()
    mykey = urllib2.urlopen(url)
    take = open("queue_.txt", "w")

    for text in mykey:
        match = re.search('<a href="/(.+?)" title=', text)
        if match:
            print >> take, 'http://www.crunchyroll.com/'+match.group(1)

    take.close()

    with open('queue_.txt') as f,  open('queue.txt', 'w') as fout:
        fout.writelines(reversed(f.readlines()))
    os.remove('queue_.txt')

like this one d0c470e731 1

and add line in menu 296 => autocatch crunchylink :)

and line 330 :

    elif seleccion == 8 :
        autocatch()
        queueu('.\\queue.txt')
    elif seleccion == 9 :
        import debug
    elif seleccion == 0 :
        sys.exit()

rcyclope avatar Aug 20 '16 22:08 rcyclope

I don't understand the purpose of this change.

jsonn avatar Aug 23 '16 22:08 jsonn

he catch all link from series exemple : in menu choice 8 indicate the url of the series (not episode link) http://puu.sh/qMpPX/e551ba83b3.png

and he catch all episodes url in queue.txt and start it http://puu.sh/qMpWu/d8b684abde.png

rcyclope avatar Aug 24 '16 07:08 rcyclope

@rcyclope not works i have this error ;D image

Dokman avatar Sep 22 '16 01:09 Dokman

have you inserted the lignes like this one http://puu.sh/rjNgj/199e5069d4.png

i think it's a space problem in the code try to see with python idle if you have a red ligne on "elif seleccion == 8 :"

C/P this lignes :

    try:
        seleccion = int(input("> "))
    except:
        try:
            os.system('cls')
        except:
            try:
                os.system('clear')
            except:
                pass
        print "ERROR: Invalid option."
        makechoise()
    if seleccion == 1 :
        ultimate.ultimate(raw_input('Please enter Crunchyroll video URL:\n'), '', '')
    elif seleccion == 2 :
        decode.decode(raw_input('Please enter Crunchyroll video URL:\n'))
    elif seleccion == 3 :
        username = raw_input(u'Username: ')
        password = getpass('Password(don\'t worry the password are typing but hidden:')
        login.login(username, password)
        makechoise()
    elif seleccion == 4 :
        login.login('', '')
        makechoise()
    elif seleccion == 5 :
        queueu('.\\queue.txt')
    makechoice()
    elif seleccion == 6 :
        settings_()
        makechoise()
    elif seleccion == 7 :
        autocatch()
        queueu('.\\queue.txt')
    elif seleccion == 8 :
        import debug
    elif seleccion == 0 :
        sys.exit()
    else:
        try:
            os.system('cls')
        except:
            try:
                os.system('clear')
            except:
                pass
        print "ERROR: Invalid option."
        makechoise() 

rcyclope avatar Sep 22 '16 07:09 rcyclope

@rcyclope don't worry i downloaded an IDE for python and i fixed the code, then i make a pull request now all we have the autocatch function so... yeah!

Dokman avatar Sep 22 '16 10:09 Dokman

@rcyclope i don't have any knowledge of python lang and i don't know how this library works, but this autocatch need to get the season, for example if you use jojo bizarre adventure it will download like 3 or 4 seasons

Dokman avatar Sep 22 '16 20:09 Dokman

get link by season ?? i'll see that if possible

rcyclope avatar Sep 23 '16 07:09 rcyclope

@rcyclope thanks to watch if it can be done, cause if we download an extense anime with a lot of seasons we have all the episodes in the same location and messy episodes

Dokman avatar Sep 23 '16 17:09 Dokman

I tried to catch a link per season, but it is very difficult to select some link in the html tag, because it's too broad

if someone has the soluce please answer it

rcyclope avatar Sep 26 '16 07:09 rcyclope