KurtBestor / Hitomi-Downloader

:cake: Desktop utility to download images/videos/music/text from various websites, and more.
21.66k stars 2k forks source link

rule34 #6761

Open 4Sol opened 8 months ago

4Sol commented 8 months ago

How to download from here? It just saying unknown site. (rule34video.com)

rickmiron commented 8 months ago

Correctly install python 3.10 or higher on your PC. Use this plugin on hitomidownloader: https://github.com/rickmiron/variado/blob/main/rule34video_downloader.py

4Sol commented 8 months ago

Correctly install python 3.10 or higher on your PC. Use this plugin on hitomidownloader: https://github.com/rickmiron/variado/blob/main/rule34video_downloader.py

Hello Not working I have python --version: 3.10.10 It started downloading but showing no speed, It correctly showed the amount of videos and bar was filling up from 0 to 45, but the folder was empty, nothing was downloading, but it showed 100% progress It creates the folder and thumbnail in hitomi but not downloading anything\

I tried both bulk and specific video dwnld allfallen script from here https://github.com/KurtBestor/Hitomi-Downloader/wiki/Scripts-&-Plugins is working

rickmiron commented 8 months ago

Post the error information

4Sol commented 8 months ago

Post the error information

There was no error, the task was finished with no files downloaded

rickmiron commented 8 months ago

Does it always happen or sometimes? Update to the latest version of python

4Sol commented 8 months ago

Does it always happen or sometimes? Update to the latest version of python

Always. I updated to the last stable version, it did not help.

rickmiron commented 8 months ago

Post the information about the task. Do you use Windows, Linux or Mac?

4Sol commented 8 months ago

Win 10 x64

https://ctxt.io/2/AADQFhFqEw

rickmiron commented 8 months ago

Open cmd and insert all this text, and check what number you get by r.status_code, the correct number is 302. Otherwise something is wrong with python, repeat the test 3 times.

python
import requests
u = 'https://rule34video.com/get_file/21/9c07107795684f3d996e05de23841d317879e7c419/3236000/3236729/3236729_1080p.mp4/?download_filename=asuka-the-tight-breedable-slut_1080p.mp4&download=true&br=4140'
r = requests.head(u,headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36'})
if r.status_code == 302:
   print(r.headers['Location'])
else:
   print(r.headers)

print(r.status_code)
print(r.status_code)
4Sol commented 8 months ago

Open cmd and insert all this text, and check what number you get by r.status_code, the correct number is 302. Otherwise something is wrong with python, repeat the test 3 times.

python
import requests
u = 'https://rule34video.com/get_file/21/9c07107795684f3d996e05de23841d317879e7c419/3236000/3236729/3236729_1080p.mp4/?download_filename=asuka-the-tight-breedable-slut_1080p.mp4&download=true&br=4140'
r = requests.head(u,headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36'})
if r.status_code == 302:
   print(r.headers['Location'])
else:
   print(r.headers)

print(r.status_code)
print(r.status_code)

It gives code errors string 4 - symbol 20 string 4 - 42 string 5 - 3

rickmiron commented 8 months ago

We could look for what problems your python is having, but let's better use another route. Replace this part of code in the file

def pythonexter(url):
    comans = [
        "python",
        "import requests",
        f"u = '{url}'",
        "r = requests.head(u,headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36'})",
        "if r.status_code == 302:",
        "   print(r.headers['Location'])",
        "elif r.status_code < 300:",
        "   print(u)",
        "exit()"
    ]
    proceso = subprocess.Popen(["cmd"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
    for line in comans:
        proceso.stdin.write((line + "\n").encode("utf-8"))
    proceso.stdin.close()
    output, _ = proceso.communicate()
    output = output.decode("utf-8", errors="ignore")
    return output.splitlines()[-3]

for this other one and try it

def pythonexter(url):
    proceso = subprocess.Popen(["cmd"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
    proceso.stdin.write((f'curl -I -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" "{url}"\n').encode("utf-8"))
    proceso.stdin.close()
    output, _ = proceso.communicate()
    lines = output.decode("utf-8", errors="ignore").splitlines()
    code = lines[4][9:12]
    return lines[8][10:] if code == '302' else url if code == '200' else code
4Sol commented 8 months ago

Maybe something wrong with environment variables? Some weird old version is of python is there I've deleted it, but it did not help https://i.imgur.com/Nt1QTvQ.png

First code: a lot of syntax errors

line:4 character:27
+ "import requests",
+ ~
Missing expression after ",".
line:5 character:9
+ f "u = '{url}'"
+ ~~~~~~~~~~~~~~
Unexpected token "f "u = '{url}'"" in an expression or operator.
string:5 character:23
+ f "f "u = '{url}'
+ ~
Missing argument in the parameter list.
line:13 character:33
+ proceso = subprocess.Popen(["cmd"], stdin=subprocess.PIPE, stdout ...
+ ~
Missing type name after "[".
line:13 character:39
+ proceso = subprocess.Popen(["cmd"], stdin=subprocess.PIPE, stdout ...
+ ~
Missing argument in the parameter list.
line:14 character:8
+ for line in comans:
+ ~
Missing opening character "(" after the "for" keyword.
line:16 character:25
+ proceso.stdin.close()
+ ~
Expression expected after ''(''.
line:17 character:11
+ output, _ = proceso.communicate()
+ ~
Missing argument in the parameter list.
line:17 character:37
+ output, _ = proceso.communicate()
+ ~
An expression was expected after ''(''.
line:18 character:36
+ output = output.decode("utf-8", errors="ignore")
+ ~
There is a missing expression after ",".
Not all parsing errors are reported.  Correct the errors listed in the messages and try again.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpressionAfterToken

Second one is also gives a lot of error:

line:2 character:33
+ proceso = subprocess.Popen(["cmd"], stdin=subprocess.PIPE, stdout ...
+ ~
Missing type name after "[".
line:2 sign:39
+ proceso = subprocess.Popen(["cmd"], stdin=subprocess.PIPE, stdout ...
+ ~
Missing argument in the parameter list.
line:4 character:25
+ proceso.stdin.close()
+ ~
An expression was expected after ''(''.
line:5 character:11
+ output, _ = proceso.communicate()
+ ~
Missing argument in the parameter list.
line:5 character:37
+ output, _ = proceso.communicate()
+ ~
An expression was expected after ''(''.
line:6 character:35
+ lines = output.decode("utf-8", errors="ignore").splitlines()
+ ~
Missing expression after ",".
line:6 character:36
+ lines = output.decode("utf-8", errors="ignore").splitlines()
+ ~~~~~~~~~~~~~~~
Unexpected token "errors="ignore"" in an expression or operator.
line:6 character:35
+ lines = output.decode("utf-8", errors="ignore").splitlines()
+ ~
Missing closing character ")" in an expression.
line:6 character:51
+ lines = output.decode("utf-8", errors="ignore").splitlines()
+ ~
Unexpected token ")" in an expression or operator.
line:6 character:64
+ lines = output.decode("utf-8", errors="ignore").splitlines()
+ ~
An expression was expected after ''(''.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingTypename
rickmiron commented 8 months ago

Open cmd and type: python --version

About this comment https://github.com/KurtBestor/Hitomi-Downloader/issues/6761#issuecomment-1880265556 I mention that you replace it in the file: https://github.com/rickmiron/variado/blob/main/rule34video_downloader.py and the modified file try it in hitomi downloader and not in cmd

4Sol commented 8 months ago

Python 3.12.1

I changed the script, not working sadly

`HPinky)Orc's plinko Game(3239489.mp4

version: 4.0 (23-12-02 05:25:00 UTC) platform / locale: Windows-10-10.0.19045-SP0 / en_en order / group / uid: 0 / False / 83f312453c384beb92e4beb42ba9629a input: https://rule34video.com/videos/3239489/orc-s-plinko-game/ type: rule34video single: True url: https://rule34video.com/videos/3239489/orc-s-plinko-game/ dir: hitomi_exhentai_folder #1_rule34video zip: artist: None valid / done: True / True range / range_p: None / None time: 1704790814.420217 (24-01-09 09:00:14 UTC) - 41s elapsed tags: [] lock: False color: done paused: False format: None p2f: None segment: {'chunk': 1048576, 'n_threads': 4, 'overwrite': False} admin: True goodbyedpi: True ytdl: yt_dlp 2023.10.07 pinned: False extras: {} live: False changed: True

[File Names]

[URLs] [0001] LazyUrl(https://rule34video.com/get_file/27/07622da9c987bbf96a635a2c009cf04438c28917ae/3239000/3239489/3239489_1080p.mp4/?download_filename=orc-s-plinko-game_1080p.mp4&download=true&br=3789) --->

[Messages] getfile https://rule34video.com/get_file/27/07622da9c987bbf96a635a2c009cf04438c28917ae/3239000/3239489/3239489_1080p.mp4/?download_filename=orc-s-plinko-game_1080p.mp4&download=true&br=3789 getx fin stop EOT: https://rule34video.com/videos/3239489/orc-s-plinko-game/ (33.7s)`

rickmiron commented 8 months ago

Test it https://github.com/rickmiron/variado/blob/main/rule34video_downloaderW.py

4Sol commented 8 months ago

Test it https://github.com/rickmiron/variado/blob/main/rule34video_downloaderW.py

No files were downloaded

Zjera)Halloween - Marie Rose(3239609.mp4

version: 4.0 (23-12-02 05:25:00 UTC) platform / locale: Windows-10-10.0.19045-SP0 / en_en order / group / uid: 0 / False / 0c803383d02e49f9a087d5d38c1882a9 input: https://rule34video.com/videos/3239609/halloween-marie-rose/ type: rule34video single: True url: https://rule34video.com/videos/3239609/halloween-marie-rose/ dir: hitomi_exhentai_folder #1_rule34video zip: artist: None valid / done: True / True range / range_p: None / None time: 1704802787.9506457 (24-01-09 12:19:47 UTC) - 46s elapsed tags: [] lock: False color: done paused: False format: None p2f: None segment: {'chunk': 1048576, 'n_threads': 4, 'overwrite': False} admin: True goodbyedpi: True ytdl: None None pinned: False extras: {} live: False changed: True

[File Names]

[URLs] [0001] LazyUrl(https://rule34video.com/get_file/21/dd132c72cc15140b8aa600a0540cd8bf069f7c9872/3239000/3239609/3239609_1080p.mp4/?download_filename=halloween-marie-rose_1080p.mp4&download=true&br=6797) --->

[Messages] getfile https://rule34video.com/get_file/21/dd132c72cc15140b8aa600a0540cd8bf069f7c9872/3239000/3239609/3239609_1080p.mp4/?download_filename=halloween-marie-rose_1080p.mp4&download=true&br=6797 getx fin stop EOT: https://rule34video.com/videos/3239609/halloween-marie-rose/ (27.2s)

rickmiron commented 8 months ago

curl is already pre-installed on windows, open cmd and check if you have curl installed: curl --version

4Sol commented 8 months ago

curl 8.4.0 (Windows) libcurl/8.4.0 Schannel WinIDN Release-Date: 2023-10-11 Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp Features: AsynchDNS HSTS HTTPS-proxy IDN IPv6 Kerberos Largefile NTLM SPNEGO SSL SSPI threadsafe Unicode UnixSockets

rickmiron commented 8 months ago

Try the new change and show me the information you get https://github.com/rickmiron/variado/blob/main/rule34video_downloaderW.py

4Sol commented 8 months ago

Not working PS It does not create artist folder as well `Zjera)Shiala: The Mirage(3124546.mp4

version: 4.0 (23-12-02 05:25:00 UTC) platform / locale: Windows-10-10.0.19045-SP0 / en_en order / group / uid: 0 / False / 13ef3645194c427fb2255bc9981a2636 input: https://rule34video.com/videos/3124546/shiala-the-mirage/ type: rule34video single: True url: https://rule34video.com/videos/3124546/shiala-the-mirage/ dir: hitomi_exhentai_folder #1_rule34video zip: artist: None valid / done: True / True range / range_p: None / None time: 1704809048.0755699 (24-01-09 14:04:08 UTC) - 56s elapsed tags: [] lock: False color: done paused: False format: None p2f: None segment: {'chunk': 1048576, 'n_threads': 4, 'overwrite': False} admin: True goodbyedpi: True ytdl: None None pinned: False extras: {} live: False changed: True

[File Names]

[URLs] [0001] LazyUrl(https://rule34video.com/get_file/21/0690369edce4810436478f3d8db993d0bbed8b79fe/3124000/3124546/3124546_1080p.mp4/?download_filename=shiala-the-mirage_1080p.mp4&download=true&br=4655) --->

[Messages] getfile https://rule34video.com/get_file/21/0690369edce4810436478f3d8db993d0bbed8b79fe/3124000/3124546/3124546_1080p.mp4/?download_filename=shiala-the-mirage_1080p.mp4&download=true&br=4655 ['Microsoft Windows [Version 10.0.19045.3803]', '(c) ௮ (Microsoft Corporation). ࠢ 饭.', '', 'W:\! HITOMI DOWNLOADER>curl -I -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" "https://rule34video.com/get_file/21/0690369edce4810436478f3d8db993d0bbed8b79fe/3124000/3124546/3124546_1080p.mp4/?download_filename=shiala-the-mirage_1080p.mp4&download=true&br=4655"', '', 'W:\! HITOMI DOWNLOADER>'] getx fin stop EOT: https://rule34video.com/videos/3124546/shiala-the-mirage/ (33.7s) `

rickmiron commented 8 months ago

curl not working? open cmd and put this

curl -I -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" "https://rule34video.com/get_file/21/0690369edce4810436478f3d8db993d0bbed8b79fe/3124000/3124546/3124546_1080p.mp4/?download_filename=shiala-the-mirage_1080p.mp4&download=true&br=4655"

and then try this.

curl -I -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" "https://rule34video.com/videos/3124546/shiala-the-mirage/"
4Sol commented 8 months ago

curl: (35) Recv failure: Connection was reset

curl: (35) Recv failure: Connection was reset

4Sol commented 8 months ago

https://github.com/DaxEleven/Rule34.xxx-Downloader/issues/14 Similar issue I have with this one, framewok is the latest though

4Sol commented 7 months ago

No ideas anymore? :D

rickmiron commented 7 months ago

I don't know what restrictions your PC has when obtaining the headers of a URL request. did you try it on another pc?