Commit a570655e authored by Francesco Poldi's avatar Francesco Poldi

Fix #348

parent 25a9d99d
...@@ -129,7 +129,7 @@ async def Request(url, connector=None, params=[], headers=[]): ...@@ -129,7 +129,7 @@ async def Request(url, connector=None, params=[], headers=[]):
async def Response(session, url, params=[]): async def Response(session, url, params=[]):
logme.debug(__name__+':Response') logme.debug(__name__+':Response')
with timeout(30): with timeout(30):
async with session.get(url, ssl=False, params=params, proxy=httpproxy) as response: async with session.get(url, ssl=True, params=params, proxy=httpproxy) as response:
return await response.text() return await response.text()
async def RandomUserAgent(): async def RandomUserAgent():
...@@ -168,6 +168,7 @@ async def User(url, config, conn, user_id = False): ...@@ -168,6 +168,7 @@ async def User(url, config, conn, user_id = False):
soup = BeautifulSoup(response, "html.parser") soup = BeautifulSoup(response, "html.parser")
if user_id: if user_id:
return int(inf(soup, "id")) return int(inf(soup, "id"))
await Users(soup, config, conn)
except Exception as e: except Exception as e:
logme.critical(__name__+':User:' + str(e)) logme.critical(__name__+':User:' + str(e))
print(str(e) + " [x] get.User") print(str(e) + " [x] get.User")
......
...@@ -223,7 +223,7 @@ def Following(config): ...@@ -223,7 +223,7 @@ def Following(config):
def Lookup(config): def Lookup(config):
logme.debug(__name__+':Lookup') logme.debug(__name__+':Lookup')
url = f"http://twitter.com/{config.Username}?lang=en" url = f"https://twitter.com/{config.Username}?lang=en"
get_event_loop().run_until_complete(get.User(url, config, db.Conn(config.Database))) get_event_loop().run_until_complete(get.User(url, config, db.Conn(config.Database)))
def Profile(config): def Profile(config):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment