First of all: Thank you for this Library !
EDIT/SOLVED: Sometimes writing things down is all you need to do to spot the problem.
There were some forbidden characters (":") in the filename.
I am quite new to PureBasic, I have some experience with VBA, SQL & Java though.
As an excercise I am writing a little Podcast downloader.
So far it works fine, it reads a config XML file, where the urls of the podcast feeds are stored.
Then it downloads the xml/rss file of the podcast, and reads the propertys of the items/episodes.
The plan was/is to download the single mp3 using the urls from the feed.
But somehow this doesnt't always work, the download progresses as planned, but in
the end there is nothing but a 0 kb file without an extension.
Code: Select all
Downloading to file 'J:\PodcastTest\hr-iNFO Wissenswert\Meilensteine der Popmusik - Talking Heads: Psycho Killer (1977).mp3'
Progress: 0.0000000000
Progress: 0.0752758682
Progress: 0.1505517364
Progress: 0.2258276045
Progress: 0.3011034727
Progress: 0.3763793409
Progress: 0.4516552091
Progress: 0.5269311070
Progress: 0.6022069454
Progress: 0.6774828434
Progress: 0.7527586818
Progress: 0.8280345798
Progress: 0.9033104181
Progress: 0.9785863161
This results in a 0 kb file "J:\PodcastTest\hr-iNFO Wissenswert\Meilensteine der Popmusik - Talking Heads: Psycho Killer (1977)"
Here is my basic code:
Code: Select all
XIncludeFile "disconnect.pbi" ;Must be in front of all HTTP Query Includes!!
XIncludeFile "http.pbi"
InitNetwork()
Define overwrite
Define.s EntryUrl,Ordner
EntryUrl = "http://mp3.podcast.hr-online.de/mp3/podcast/hr2_wissenswert/hr2_wissenswert_20140322_3.mp3"
Ordner = "J:\PodcastTest\hr-iNFO Wissenswert\Meilensteine der Popmusik - Talking Heads: Psycho Killer (1977).mp3"
SimpleHTTP_GET_File(EntryUrl, Ordner, overwrite.i = #True)
It works fine with other podcasts though.
Any idea/diagnosis on what may be the problem there ?
Best regards
Sebert