Skip to content

Commit

Permalink
Update: update json data
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiandongx committed Feb 17, 2019
1 parent dbb0667 commit 2878d0a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions bili/bili_video_name.py
Expand Up @@ -31,7 +31,7 @@ def get_video_name(aids):
req = requests.get(url.format(i), headers=headers).text
q = pyquery.PyQuery(req)
yield {i: q("h1[title]").text()}
except Exception as e:
except:
pass


Expand All @@ -41,8 +41,10 @@ def update_db_video_name(names):
for row in names:
for v_aid, v_name in row.items():
try:
print(v_aid, v_name)
cur.execute(sql, (v_name, v_aid))
except:
except Exception as e:
print(e)
conn.rollback()
conn.commit()

Expand Down
2 changes: 1 addition & 1 deletion json/v_coin.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/v_danmaku.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/v_favorite.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/v_reply.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/v_share.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/v_view.json

Large diffs are not rendered by default.

0 comments on commit 2878d0a

Please sign in to comment.