Gitmask Anonymous PR#41
Open
gitmask-anonymous wants to merge 1 commit into
Open
Conversation
rysson
requested changes
Mar 5, 2019
| if names_found.startswith('Zwiastun') and not title.startswith('Zwiastun'): | ||
| continue | ||
| names_found = names_found.split('/') | ||
| names_found = names_found.encode('utf-8').split('/') |
Collaborator
There was a problem hiding this comment.
Hmmm, jest OK.
Przy okazji może poprawić cleantitle.normalize, aby w kółko nie kodować i nie dekodować?
Collaborator
There was a problem hiding this comment.
Po włączeniu PR #45, zmiana w normalize nie będzie konieczna.
| continue | ||
|
|
||
| local_found = client.parseDOM(str(title_found).replace("Å ", "ń"), 'a')[0] | ||
| return [client.parseDOM(row, 'a', ret='href')[0]] | ||
| return None | ||
| except Exception,e: | ||
| print e |
Collaborator
There was a problem hiding this comment.
Po to jest funkcja log_exception
| return sources | ||
| except: | ||
| except Exception,e: | ||
| print e |
Collaborator
There was a problem hiding this comment.
Po to jest funkcja log_exception
|
|
||
| self.base_link = 'https://fili.cc' | ||
| self.url_transl = 'embed?type=%s&code=%s&code2=%s&salt=%s' | ||
| self.url_transl = 'embed?type=%s&code=%s&code2=%s&salt=%s&title=title&title2=title2' |
| try: return title.decode('ascii').encode("utf-8") | ||
| except: pass | ||
| return str(''.join(c for c in unicodedata.normalize('NFKD', unicode(title.decode('utf-8'))) if unicodedata.category(c) != 'Mn')).replace('ł','l') | ||
| return str(''.join(c for c in unicodedata.normalize('NFKD', unicode(title.decode('utf-8'))) if unicodedata.category(c) != 'Mn').replace(u"\u0142",'l')) |
|
|
||
| import re, sys, cookielib, urllib, urllib2, urlparse | ||
| import StringIO, HTMLParser, time, random, base64, requests | ||
| import StringIO, HTMLParser, time, random, base64 |
Collaborator
There was a problem hiding this comment.
Jaki cel przyświeca usuwaniu modułu requests?
Jak widzę poniżej jest o wiele więcej kodu. Zdecydowana większość to obsługa połączenia, co zapewnia requests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an anonymous PR submitted via Gitmask - https://www.gitmask.com