Christopher K. Hoadley
ae2fd7a729
Add username and site information to Query Result object. This will allow whoever defines a Query Notify object to have all of the context required to do their notifications.
5 years ago
Christopher K. Hoadley
c07d3967aa
Create QueryNotify() base class for notifying the caller about the results.
5 years ago
Christopher K. Hoadley
c054712920
Move response time for query into QueryResult() object.
5 years ago
Christopher K. Hoadley
2a8f97b609
Fix tests for metacritic. Unclaimed username was illegal.
5 years ago
Christopher K. Hoadley
6f3fc3d548
Remove AdobeForums. All usernames are reported available.
5 years ago
Christopher K. Hoadley
5edc3c0a0b
Fix tests. Instagram no longer uses the message detection.
5 years ago
Christopher K. Hoadley
529b37bc60
Change tests so that expected state is first and actual state follows (previous order was confusing). Also use "claimed" and "available" terms when reporting test results.
5 years ago
Christopher K. Hoadley
92879af8eb
Merge remote-tracking branch 'origin/master' into restructure_take1
...
# Conflicts:
# README.md
# sherlock/sherlock.py
5 years ago
Christopher K. Hoadley
32385a1d8d
Merge remote-tracking branch 'origin/master' into restructure_take1
5 years ago
Christopher K. Hoadley
e41b485771
Merge remote-tracking branch 'origin/master' into restructure_take1
5 years ago
Christopher K. Hoadley
de0ccfebb7
Add option to skip test if site returns error status (e.g. timeout connecting with site). This makes it easier to interpret the test results.
5 years ago
Christopher K. Hoadley
2c9fb4f295
Change SitesInformation() to use a generator when iterating thru the sites. This avoids the problem of the state (i.e. self.__iteration_index) getting corrupted if any of the methods of a given object needed to iterate for their own purposes while a caller was already iterating thru the same object. The code is also much simpler to follow.
5 years ago
Christopher K. Hoadley
1101af8132
Add @sdushantha suggestion in creating directory.
5 years ago
Christopher K. Hoadley
f48a2980f5
Use SitesInformation() object in tests. For now, use the new SitesInformation() object to calculate the original JSON dictionary: the rest of the code will be updated in the future.
5 years ago
Christopher K. Hoadley
8f6938ecb1
Add option to *not* print out results. Configure tests to there is no print output. This simplifies looking at the error output when the tests fail.
5 years ago
Christopher K. Hoadley
f29cab49e4
Add popularity rank to Site Information object. Add method to retrieve list of names of the sites (sorted by alphabetical or popularity rank).
5 years ago
Christopher K. Hoadley
2e195d4439
Move all writing of output files to occur after query takes place. Use with statement for results file, as that is more graceful on errors. Use try block for result directory creation: this has a smaller window for a race condition.
5 years ago
Christopher K. Hoadley
123e4d47e0
Merge remote-tracking branch 'origin/master' into restructure_take1
5 years ago
Christopher K. Hoadley
ba0a44e0ae
Merge remote-tracking branch 'origin/master' into restructure_take1
...
# Conflicts:
# sherlock/resources/data.json
5 years ago
Christopher K. Hoadley
7f87f5fcc4
Add module to store information about the sites. This handles getting the information loaded from the JSON file. For now, use the new SitesInformation() object to calculate the original JSON dictionary: the rest of the code will be updated in the future.
5 years ago
Christopher K. Hoadley
647aea577c
Factor out all print statements from portion of code that determines the query results.
5 years ago
Christopher K. Hoadley
bbb44d7ef9
Add defensive check for unknown Error Type. If it does happen, an exception will be thrown, instead of using the previous site's results.
5 years ago
Christopher K. Hoadley
2a8f83924d
Remove some unneeded imports. Add minor comment.
5 years ago
Christopher K. Hoadley
2a1ab1c281
Add result module to hold results of site queries. The QueryResult() object contains an enumeration for the possible status about a given username on a site, and additional error information that might be handy. Rework all code to use this object instead of the "exists" key in the result dictionary that was used previously.
5 years ago
Christopher K. Hoadley
519ac34346
Extract all print statements from function that gets the response. Also, print out social network for error messages.
5 years ago
Christopher K. Hoadley
6114ca263d
Remove Proxy List Support
...
While doing the restructuring, I am testing in more depth as I change the code. And, I am trying to grok how the proxy options work. Specifically, how the proxy list works. Or, does not work.
There is code in the main function that randomly selects proxies from a list, but it does not actually use the result. This was noticed in #292 . It looks like the only place where the proxy list is used is when there is a proxy error during get_response()...in that case a new random proxy is chosen. But, there is no care taken to ensure that we do not get the same proxy that just errored out. It seems like problematic proxies should be blacklisted if there is that type of failure.
Moreover, there is a check earlier in the code that does not allow the proxy list and proxy command line option to be used simultaneously. So, I can see no way that the proxy list has any functionality: if you do define the proxy list, then there is no way to kick off the general request with a proxy.
I also noticed that the recursive get_response() call does not pass its return tuples back up the call chain. The existing code would never get any good from the switchover to an alternate proxy (even if the other problems mentioned above were resolved).
For now, I am removing the support. This feature may be looked at after the restructuring is done.
5 years ago
Christopher K. Hoadley
9e8e1a5aa4
Merge remote-tracking branch 'origin/master' into restructure_take1
...
# Conflicts:
# sherlock/sherlock.py
5 years ago
Christopher K. Hoadley
0a455339c2
Merge remote-tracking branch 'origin/master' into restructure_take1
5 years ago
Christopher K. Hoadley
b92b931504
Merge remote-tracking branch 'origin/master' into restructure_take1
...
# Conflicts:
# sherlock/sherlock.py
5 years ago
Christopher K. Hoadley
b0b7608549
Merge remote-tracking branch 'origin/master' into restructure_take1
...
# Conflicts:
# sherlock/sherlock.py
5 years ago
Christopher K. Hoadley
f89fe03b34
Merge remote-tracking branch 'origin/master' into restructure_take1
...
# Conflicts:
# sherlock/sherlock.py
5 years ago
Christopher K. Hoadley
a900d0f674
Merge remote-tracking branch 'origin/master' into restructure_take1
...
# Conflicts:
# sherlock/sherlock.py
5 years ago
Christopher K. Hoadley
571f27f9a5
Clean up code that only reads the headers if we are doing HTTP Status detection. Remove special check for GitHub: everything works fine without it.
5 years ago
Christopher K. Hoadley
2268f8186c
Remove unneeded assignment of results before main Sherlock call.
5 years ago
Christopher K. Hoadley
232a5f7d07
Clarify meaning of "Total Websites" count. It is really "Total Websites Username Detected On".
5 years ago
Christopher K. Hoadley
ecf097e00d
Get rid of global variable amount. This is no longer used.
5 years ago
Christopher K. Hoadley
96ac2f15fd
Merge remote-tracking branch 'origin/master' into restructure_take1
5 years ago
Christopher K. Hoadley
d8c8cd8e7e
Leave the elapsed time for the request in seconds. Move format of time into ms to the presentation layer.
5 years ago
Christopher K. Hoadley
b02ef5e6e2
Use monotonic() time function. This method is guaranteed to not do flaky things during leap seconds or daylight savings times jumps.
5 years ago
Christopher K. Hoadley
d6d6b83b06
Add documentation to extension to FuturesSession() which we use to get timing information. Fix problem where timing hook would not be installed properly if the hooks for the request was already filled out with a tuple. I am not sure if that is even possible, but if it does happen, then I just convert the tuple to a list and go on from there.
5 years ago
Christopher K. Hoadley
578248bf8e
Do not create session and request objects if we are going to end up creating new one for Tor requests. This just wastes time.
5 years ago
Christopher K. Hoadley
8ef999fffd
Merge remote-tracking branch 'origin/master' into restructure_take1
5 years ago
Christopher K. Hoadley
1587df0860
Merge remote-tracking branch 'origin/master' into restructure_take1
5 years ago
Christopher K. Hoadley
d17268e737
Move content into sherlock sub-directory inside of repo. This directory will look very much like what the packaged version of Sherlock will look like when it is installed in the site-packages area.
...
No real restructuring of the code has happened. This just gives a view of the directory structure.
5 years ago