Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2dc5542bb2 | ||
|
|
6ec47572de | ||
|
|
a769502237 | ||
|
|
928165467c |
@@ -10,12 +10,15 @@ A program to aid in queuing downloads from Vimm.net
|
||||
### Shared
|
||||
|
||||
- [Google Chrome](https://www.google.com/chrome/)
|
||||
- [Chromedriver](https://googlechromelabs.github.io/chrome-for-testing/)
|
||||
- ~~[Chromedriver](https://googlechromelabs.github.io/chrome-for-testing/)~~
|
||||
|
||||
### Source
|
||||
|
||||
- Python 3.11 (others might work)
|
||||
- Selenium `pip install selenium`
|
||||
- Results `pip install results`
|
||||
- Pathlib ` pip install pathlib`
|
||||
- Pathvalidate `pip install pathvalidate`
|
||||
|
||||
## Programs
|
||||
|
||||
@@ -68,6 +71,7 @@ V-dlp will parse a file and attempt to download each one at a time.
|
||||
- [X] Show number of URLs
|
||||
- [X] Show download name/size
|
||||
- [X] Add headless option
|
||||
- [X] Remove dependency of Chrome Driver
|
||||
- [X] Show failed downloads
|
||||
- [X] Remove duplicate URLs
|
||||
- [X] Get all links (#, A-Z)
|
||||
@@ -78,7 +82,6 @@ V-dlp will parse a file and attempt to download each one at a time.
|
||||
- [ ] Proper error handling
|
||||
- [ ] Download manuals
|
||||
- [ ] Email upon completion
|
||||
- [ ] Remove dependency on external start of Chrome Driver
|
||||
- [ ] Click on ads
|
||||
- [ ] OS agnostic (heavily Windows based as they need the most hand holding)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import glob
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
from pathvalidate import sanitize_filename
|
||||
import random
|
||||
import requests
|
||||
from selenium import webdriver
|
||||
@@ -16,7 +17,7 @@ from selenium.webdriver.support import expected_conditions as EC
|
||||
import sys
|
||||
import time
|
||||
|
||||
__version__ = "2026.3.25.0"
|
||||
__version__ = "2026.3.26.0"
|
||||
|
||||
# Helper for logging
|
||||
def setup_logging(mode="syslog", logfile=None):
|
||||
@@ -122,11 +123,7 @@ def main():
|
||||
chrome_options.add_experimental_option("prefs", prefs)
|
||||
|
||||
driver = webdriver.Chrome(options=chrome_options)
|
||||
#driver = webdriver.Chrome(service=Service(r"C:\Tools\Standalone\chromedriver.exe"), options=chrome_options)
|
||||
#driver = webdriver.Remote(
|
||||
# command_executor=f"http://127.0.0.1:{chrome_port}",
|
||||
# options=chrome_options
|
||||
#)
|
||||
|
||||
if headless == True:
|
||||
# Chrome sometimes blocks downloads in headless mode
|
||||
driver.execute_cdp_cmd(
|
||||
@@ -203,12 +200,14 @@ def main():
|
||||
response.raise_for_status()
|
||||
if response.status_code == 200:
|
||||
fext = 'avif'
|
||||
ftitle = sanitize_filename(title)
|
||||
if iform == 2:
|
||||
fext = 'webp'
|
||||
save_path = os.path.join(download_dir, f"{title}.{fext}")
|
||||
save_path = os.path.join(f"{download_dir}", f"{ftitle}.{fext}")
|
||||
with open(save_path, 'wb') as file:
|
||||
for chunk in response.iter_content(1024):
|
||||
file.write(chunk)
|
||||
time.sleep(1)
|
||||
else:
|
||||
logging.warning(f"Could not download box image: {response.status_code} - {response.reason}")
|
||||
pass
|
||||
@@ -237,6 +236,7 @@ def main():
|
||||
logging.warning("No large box image found.")
|
||||
actions = ActionChains(driver)
|
||||
actions.move_to_element_with_offset(body_element, random.randint(1, 100), random.randint(1, 100)).click().perform()
|
||||
time.sleep(1)
|
||||
except Exception as e:
|
||||
logging.warning(f"No large box image found! {e}")
|
||||
except:
|
||||
|
||||
+4
-4
@@ -7,8 +7,8 @@ VSVersionInfo(
|
||||
ffi=FixedFileInfo(
|
||||
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
||||
# Set not needed items to zero 0. Must always contain 4 elements.
|
||||
filevers=(2026,3,25,0),
|
||||
prodvers=(2026,3,25,0),
|
||||
filevers=(2026,3,26,0),
|
||||
prodvers=(2026,3,26,0),
|
||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||
mask=0x3f,
|
||||
# Contains a bitmask that specifies the Boolean attributes of the file.
|
||||
@@ -32,12 +32,12 @@ VSVersionInfo(
|
||||
u'040904B0',
|
||||
[StringStruct(u'CompanyName', u''),
|
||||
StringStruct(u'FileDescription', u'V-dlp: download a list of Vimm URLs'),
|
||||
StringStruct(u'FileVersion', u'2026.3.25.0'),
|
||||
StringStruct(u'FileVersion', u'2026.3.26.0'),
|
||||
StringStruct(u'InternalName', u'V-dlp'),
|
||||
StringStruct(u'LegalCopyright', u'© iamdoubz'),
|
||||
StringStruct(u'OriginalFilename', u'V-dlp.exe'),
|
||||
StringStruct(u'ProductName', u'V-dlp'),
|
||||
StringStruct(u'ProductVersion', u'2026.3.25.0')])
|
||||
StringStruct(u'ProductVersion', u'2026.3.26.0')])
|
||||
]),
|
||||
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
|
||||
]
|
||||
|
||||
@@ -7,8 +7,8 @@ VSVersionInfo(
|
||||
ffi=FixedFileInfo(
|
||||
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
||||
# Set not needed items to zero 0. Must always contain 4 elements.
|
||||
filevers=(2026,3,25,0),
|
||||
prodvers=(2026,3,25,0),
|
||||
filevers=(2026,3,26,0),
|
||||
prodvers=(2026,3,26,0),
|
||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||
mask=0x3f,
|
||||
# Contains a bitmask that specifies the Boolean attributes of the file.
|
||||
@@ -31,13 +31,13 @@ VSVersionInfo(
|
||||
StringTable(
|
||||
u'040904B0',
|
||||
[StringStruct(u'CompanyName', u''),
|
||||
StringStruct(u'FileDescription', u'V-dlp UG: create a list of Vimm URLs'),
|
||||
StringStruct(u'FileVersion', u'2026.3.25.0'),
|
||||
StringStruct(u'FileDescription', u'V-dlpUG: create a list of Vimm URLs'),
|
||||
StringStruct(u'FileVersion', u'2026.3.26.0'),
|
||||
StringStruct(u'InternalName', u'V-dlpUG'),
|
||||
StringStruct(u'LegalCopyright', u'© iamdoubz'),
|
||||
StringStruct(u'OriginalFilename', u'V-dlpUG.exe'),
|
||||
StringStruct(u'ProductName', u'V-dlpUG'),
|
||||
StringStruct(u'ProductVersion', u'2026.3.25.0')])
|
||||
StringStruct(u'ProductVersion', u'2026.3.26.0')])
|
||||
]),
|
||||
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
|
||||
]
|
||||
|
||||
@@ -7,7 +7,7 @@ from selenium.webdriver.chrome.options import Options
|
||||
import string
|
||||
import sys
|
||||
|
||||
__version__ = "2026.3.25.0"
|
||||
__version__ = "2026.3.26.0"
|
||||
|
||||
# Helper for logging
|
||||
def setup_logging(mode="syslog", logfile=None):
|
||||
@@ -91,10 +91,7 @@ def main():
|
||||
chrome_options.add_argument("--no-sandbox")
|
||||
chrome_options.add_argument("--disable-dev-shm-usage")
|
||||
|
||||
driver = webdriver.Remote(
|
||||
command_executor=f"http://127.0.0.1:{chrome_port}",
|
||||
options=chrome_options
|
||||
)
|
||||
driver = webdriver.Chrome(options=chrome_options)
|
||||
|
||||
# Function to read platform/letter and write links to file
|
||||
def get_links(pf, lets):
|
||||
|
||||
Reference in New Issue
Block a user