Re: [Tutor] Writing data to JSON Help

2017-12-16 Thread Peter Otten
Mats Wichmann wrote: > also, has_key is no longer favored in the Python world (that is not what > is wrong with your code). But then the beautiful soup is a world on its own: $ python3 Python 3.4.3 (default, Nov 28 2017, 16:41:13) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "lic

Re: [Tutor] Writing data to JSON Help

2017-12-15 Thread Mats Wichmann
On 12/15/2017 04:41 PM, Alan Gauld via Tutor wrote: > On 15/12/17 18:46, Lloyd Walker wrote: > >> I'm currently using string formatting to create the json rather than >> creating a dictionary and appending that dictionary to file via the JSON >> lib. > > That's probably your mistake. The standard

Re: [Tutor] Writing data to JSON Help

2017-12-15 Thread Alan Gauld via Tutor
On 15/12/17 18:46, Lloyd Walker wrote: > I'm currently using string formatting to create the json rather than > creating a dictionary and appending that dictionary to file via the JSON > lib. That's probably your mistake. The standard library is there to help you get difficult things right. Tryin

[Tutor] Writing data to JSON Help

2017-12-15 Thread Lloyd Walker
Dear All, I'm currently writing a script to scrape data from my favourite podcasting websites and compile latter data into JSON format in order to create a local website of these websites. I'm currently using string formatting to create the json rather than creating a dictionary and appending tha