Commit f1faebc8 authored by andytnt's avatar andytnt

Modify get.py

parent 7f69299b
......@@ -113,10 +113,10 @@ async def Tweet(url, config, conn):
try:
response = await Request(url)
soup = BeautifulSoup(response, "html.parser")
tweet = soup.find("div", "permalink-inner permalink-tweet-container")
location = soup.find("span", "ProfileHeaderCard-locationText u-dir").text
location = location[15:].replace("\n", " ")[:-10]
await Tweets(tweet, location, config, conn)
tweets = soup.find_all("div", "tweet")
await Tweets(tweets, location, config, conn, url)
except Exception as e:
print(str(e) + " [x] get.Tweet")
......
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