Parsing html :: output to comma delimited
Hello All, I am a total python newbie, and I need help writing a script. This is what I want to do: There is a list of links at http://www.rentalhq.com/fulllist.asp. Each link goes to a page like, http://www.rentalhq.com/store.asp?id=907%2F272%2D4425, that contains a company name, address, phone, and fax. I want extract each page, parse this information, and export it to a comma delimited text file, or tab delimited. The important information in each page is: United Rentals Inc. 3401 Commercial Dr. Anchorage AK, 99501-3024 http://maps.google.com/maps?q=3401+Commercial+Dr%2E Anchorage AK 99501-3024 "> Phone - 907/272-4425 Fax - 907/272-9683 So from that I want output like : United Rentals Inc.,3401 Commercial Dr.,Anchorage,AK,"995013024","9072724425","9072729683" or United Rentals Inc. 3401 Commercial Dr. Anchorage AK 995013024 9072724425 9072729683 I have been messing around with beautiful soup (http://www.crummy.com/software/BeautifulSoup/index.html) but haven't gotten very far. (specially because the html is so sloppy) Any help would be really appreciated! Just point me in the right direction, what to use, examples... Thanks! -Sam -- http://mail.python.org/mailman/listinfo/python-list
Re: Parsing html :: output to comma delimited
Thanks for the replies, I'll post here when/if I get it finally working. So, now I know how to extract the links for the big page, and extract the text from the individual page. Really what I need to find out is how run the script on each individual page automatically, and get the output in comma delimited format. Thanks for solving the two problems though :) -Sam -- http://mail.python.org/mailman/listinfo/python-list
Re: Problems with Python
Good day I am new to programming. I have signed up for a virtual online course and installed Python using Anaconda as well as jupyter notebook. I encountered problems & then went to YouTube tried going directly to the python website and used Pycharm. When I used pycharm and try to run the first basic program I am getting a message that it is unable to load the Virtual environment. Also a message that ??the SDK seem to be false??? or some like wording. I went to google which gave me stock overflow. I am confused there as some of the responses I see there suppose that I am into programming and understand a lot of these terms. Some things I see, I understand but none of those have made a difference. One such is to type "pip install virtenv" The system states that the requirement is already satisfied. In the process of trying to uninstall & reinstall and saw the invitation to write seeking for help. I therefore cannot immediately reproduce the error message.Can you help? Howard Samuels Are You Ready for Jesus to Come? On Tuesday, May 31, 2022, 07:54:58 AM GMT-4, Howard Samuels wrote: Good day I am new to programming. I have signed up for a virtual online course and installed Python using Anaconda as well as jupyter notebook. I encountered problems & then went to YouTube tried going directly to the python website and used Pycharm. When I used pycharm and try to run the first basic program I am getting a message that it is unable to load the Virtual environment. Also a message that ??the SDK seem to be false??? or some like wording. I went to google which gave me stock overflow. I am confused there as some of the responses I see there suppose that I am into programming and understand a lot of these terms. Some things I see, I understand but none of those have made a difference. One such is to type "pip install virtenv" The system states that the requirement is already satisfied. In the process of trying to uninstall & reinstall and saw the invitation to write seeking for help. I therefore cannot immediately reproduce the error message.Can you help? Howard Samuels Are You Ready for Jesus to Come? -- https://mail.python.org/mailman/listinfo/python-list
