-
Notifications
You must be signed in to change notification settings - Fork 4
Gitmask Anonymous PR #41
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
base: master
Are you sure you want to change the base?
Gitmask Anonymous PR #41
Conversation
| if names_found.startswith('Zwiastun') and not title.startswith('Zwiastun'): | ||
| continue | ||
| names_found = names_found.split('/') | ||
| names_found = names_found.encode('utf-8').split('/') |
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.
Hmmm, jest OK.
Przy okazji może poprawić cleantitle.normalize, aby w kółko nie kodować i nie dekodować?
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.
Po włączeniu PR #45, zmiana w normalize nie będzie konieczna.
| continue | ||
|
|
||
| local_found = client.parseDOM(str(title_found).replace("Å ", "ń"), 'a')[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.
Proszę nie wstawiać spacji
| return [client.parseDOM(row, 'a', ret='href')[0]] | ||
| return None | ||
| except Exception,e: | ||
| print 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.
Po to jest funkcja log_exception
| return sources | ||
| except: | ||
| except Exception,e: | ||
| print 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.
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' |
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.
Co to daje?
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.
To już było w #40, proszę nie mieszać PR.
| 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')) |
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.
To już było w #40, proszę nie mieszać PR.
|
|
||
| import re, sys, cookielib, urllib, urllib2, urlparse | ||
| import StringIO, HTMLParser, time, random, base64, requests | ||
| import StringIO, HTMLParser, time, random, base64 |
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.
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 is an anonymous PR submitted via Gitmask - https://www.gitmask.com