ReGex With Python - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: ReGex With Python (/thread-596.html) |
RE: ReGex With Python - snippsat - Oct-22-2016 Look at the source there is a list,as posted use [0] to get in. ['nodes'][0]['text'] RE: ReGex With Python - Kalet - Oct-22-2016 (Oct-22-2016, 05:58 PM)snippsat Wrote: Look at the source there is a list,as posted use [0] to get in. Oh, i will try this: try: while count <= len(data['entry_data']['PostPage'][0]['media']['comments']['nodes'][count]['text']): try: print(data['entry_data']['PostPage'][0]['media']['comments']['nodes'][count]['text']) count = count + 1 except: pass except: pass But, my question, If I do not put the try, I get an error, there may be a problem in the future?RE: ReGex With Python - Kalet - Oct-23-2016 (Oct-22-2016, 05:58 PM)snippsat Wrote: Look at the source there is a list,as posted use [0] to get in. Snippsat, i want to thank you very much for your help. Can I collaborate with the forum answering questions?. Thanks again!. RE: ReGex With Python - sparkz_alot - Oct-24-2016 Quote:Can I collaborate with the forum answering questions? Sure, that is what the forum is for . |