-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split parsing #788
Split parsing #788
Conversation
eb28292
to
db455f2
Compare
please respect rule!
+5,766 −4,939- Files changed 83 |
|
||
except (SocketTimeout, TypeError) as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@medariox @labrys sockets timeout its not part of requests exception. you should known better
it will raise a traceback like this:
File "C:\SickRage\Python\lib\httplib.py", line 832, in connect
self.timeout, self.source_address)
File "C:\SickRage\Python\lib\socket.py", line 575, in create_connection
raise err
timeout: timed out
need to change all logs from helpers.py |
a9a8580
to
f2b2998
Compare
@@ -1429,10 +1428,8 @@ def getURL(url, post_data=None, params=None, headers=None, # pylint:disable=too | |||
|
|||
try: | |||
resp.raise_for_status() | |||
except requests.RequestException as e: | |||
except requests.exceptions.RequestException as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@medariox shouldn't we add both? requests.RequestException
and requests.exceptions
?
one exceptions is for requests itself. other is all other execeptions right?
like sockets, it's an exceptions but not part of Requests because its sockets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just requests.exceptions.RequestException should be fine.
6c75475
to
3ea784a
Compare
3ea784a
to
f7fd9e7
Compare
@@ -107,4 +106,5 @@ def getProviderClass(provider_id): | |||
for x in sickbeard.providerList + sickbeard.newznabProviderList + sickbeard.torrentRssProviderList | |||
if x | |||
} | |||
return providers[provider_id] | |||
if providers: | |||
return providers.values()[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@medariox this change is making all providers in hstory appear with NZB image.
Also why getProviderClass used to return a list and now returns a dict?!
this change will need to be one in all over Medusa code!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now.
getProviderClass never returned a list, it always returned the first element of the list. So that's just the same, it's the first value of the dict. Since it makes very little sense to make a list/dict and return only the first element, I made it just directly return the first object now.
…e reported as ERROR and change other logs formats
TD is a special provider that we are still testing their blocks to scripts
[Rarbg] :: [42fd472] Error 20: No results found to [Rarbg] :: [42fd472] No results found. Code: 20
Separate the search and parsing functions in an effort to continue standardization of providers and enhancing of search functionality. This also subcategorizes the providers by type.