Commit e380cdb2 authored by andytnt's avatar andytnt

Modify get.py

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