Open Source Contribution - Release 0.3 Part 2

Working on pySearch



The project pySearch is written in Python and is essentially a cross platform command-line utility tool to search through and display results from Amazon, Google, StackOverflow, and etc. The idea is to search type in search commands in command line and get results from the previously listed websites.

Selected Issues


The first issue that I selected to work on for this project tackled the problem in the project that would allow for non-existent links and domains to be opened. In order to solve this problem, I needed to call a ping function to the websites before opening them.

For example, if a user decided to search for "racoon" on "google.yo", the program would open "http://www.google.yo/search?q=racoon", which does not exist.

In order to enhance the program, it should first look through popular domains to see if the selected query works with other domains. For example, "http://www.google.ca/search?q=racoon" would work.


The second issue that I selected attempts to increase the search engine coverage of the project. Currently the project supports Google, Amazon, and Twitter. However, I will be working on adding new ones with their specific search queries.


First Pull Request

I ran into the problem of ping function not working with urls that contain queries. For example, pinging "google.com" worked, however pinging "google.com/search?q=racoon" did not work. I talked to the creator of the project on Slack and we came up with an idea how to work around this issue. I will be testing what we talked about this week.

For the time being, I excluded the search query from the url and check the domains themselves.

I test that the specified domain works for a specific search engine. For example, the default domain is ".ca", however this domain would not work with StackOverflow. StackOverflow needs the domain to be ".com".

The function that I created works with any operating system and checks if the domain is valid. If the domain is not valid, it looks through specified popular domains and assigns the first one that works.

This function will be further improved this week as I am working with the creator of the project to find the best way to solve the issue that is related to this pull request.




Comments

Popular posts from this blog

Another Dropna Bug in Pandas

Unit Tests in Pandas

Progress in Open Source