JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > English Support > General Discussion
Reply
 
Thread Tools Display Modes
  #1  
Old 20.01.2018, 02:14
Program
Guest
 
Posts: n/a
Default Download from csv Videos with titles

Hello everyone,

I have a csv with 2 columns:
Title and Link (video)

I want Jdownloader do download renaming automatically the archive with the text of the first column (Title) of csv.

How to do this?

Otherwise jdownloader do download with name chinklist, i dont want this.

Thanks in advanced.

Edit in 20 jan - I found this code below
I found in the forum this script, which looks like it would do what I need, but I can not get it to work, I do not really know where to insert it, I did not find any tutorial to insert script into jdownloader.
Can someone help me?

Code:
#!/usr/bin/env python
import csv
import sys
import urllib2
import json

csvin = csv.DictReader (sys.stdin)
csvout = csv.DictWriter (sys.stdout, csvin.fieldnames + ["jderr"])
emptyout = True

for l in csvin:
  links = l ["urls"]
  pkg = l ["title"]
  links = links.replace (" ", "%20")
  pkg = pkg.replace ('"', "'").replace ("&", " ").replace (" ", "%20")
  url = "**External links are only visible to Supporters**.format (links, pkg, '""', '""')
  result = urllib2.urlopen (url)
  resp = None
  if result.getcode () == 200: resp = json.load (result)
  if not resp or resp.get ("data") != True:
    l ["jderr"] = json.dumps (resp)
    if emptyout: emptyout = False; csvout.writeheader ()
    csvout.writerow (l)

Last edited by Program; 20.01.2018 at 16:15. Reason: add more info (script)
Reply With Quote
  #2  
Old 22.01.2018, 17:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,561
Default

Instead of CSV, please use different approach with
url#name=XY and packagizer rule that parses filename from anchor.
For example see here, https://board.jdownloader.org/showpo...6&postcount=12
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply


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 11:12.
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.