File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ def process(self):
5656 output = {}
5757
5858 for k , v in self .data .items ():
59+ if v .startswith ('[' ) or v .startswith ("'" ):
60+ continue
5961 if 'email' in k and '@' in v :
6062 new_k = k + '_username'
6163 supposed_username = v .split ('@' )[0 ]
Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ def test_deviantart():
536536 assert info .get (
537537 'links' ) == "['https://www.instagram.com/muse.mercier/']"
538538 assert info .get ('tagline' ) == 'Nothing worth having is easy...'
539- assert info .get ('bio' ).startswith ('Hi my name is Muse Mercier and welcome to my ' ) is True
539+ assert info .get ('bio' ).startswith ('Hi! My name is Muse Mercier, ' ) is True
540540 assert info .get ('created_at' ).startswith ('2005-06-16' )
541541
542542
@@ -588,6 +588,7 @@ def test_gravatar():
588588 assert info .get ('emails' ) == "['k.bx@ya.ru']"
589589 assert info .get ('image' ) == 'https://secure.gravatar.com/avatar/d6ac4c55425d6f9d28db9068dbb49e09'
590590 assert info .get ('links' ) == "['http://twitter.com/kost_bebix']"
591+ assert 'emails_username' not in info
591592
592593
593594def test_pinterest_api ():
@@ -985,6 +986,7 @@ def test_trello():
985986 assert info .get ("is_verified" ) == "True"
986987
987988
989+ @pytest .mark .github_failed
988990def test_weibo ():
989991 headers = {"cookie" : "SUB=_2AkMXyuc_f8NxqwJRmP8SyWPrbo13zAvEieKhlhbkJRMxHRl-123" , "cache-control" : "no-cache" }
990992 info = extract (parse ('https://weibo.com/clairekuo?is_all=1' , headers = headers , timeout = 10 )[0 ])
You can’t perform that action at this time.
0 commit comments