Giter Club home page Giter Club logo

leetcode-anki's Introduction

Peng-YM's github stats

leetcode-anki's People

Contributors

keniushadu avatar louischerry avatar mx-in avatar npes87184 avatar peng-ym avatar stevenlyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

leetcode-anki's Issues

Does not support Chrome version 109.0.5414.119

I run python3 main.py and run into the below error:

😎 Starting browser login..., please fill the login form
Traceback (most recent call last):
  File "main.py", line 10, in <module>
    worker.login()
  File "/Users/yoci642/Desktop/Dev/LeetCode-Anki/crawler.py", line 42, in login
    browser = webdriver.Chrome(executable_path="./vendor/chromedriver")
  File "/Users/yoci642/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    desired_capabilities=desired_capabilities)
  File "/Users/yoci642/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/Users/yoci642/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/Users/yoci642/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/Users/yoci642/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 97
Current browser version is 109.0.5414.119 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

I tried downloading Chrome 97 again but this old version Chrome cannot run in the latest macOS Ventura (Version 13.2.1)

OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

请问这是什么问题呀 谢谢!
F:\LeetCode-Anki-master>python main.py
😎 Starting browser login..., please fill the login form
Traceback (most recent call last):
File "main.py", line 10, in
worker.login()
File "F:\LeetCode-Anki-master\crawler.py", line 42, in login
browser = webdriver.Chrome(executable_path="./vendor/chromedriver")
File "C:\Users\76731\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Users\76731\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\76731\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "C:\Users\76731\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 997, in _execute_child
startupinfo)
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

requests.exceptions.TooManyRedirects: Exceeded 30 redirects

I run python3 main_cn.py
I uesd leetcode-cn, and I login by phone verify code.
Then, this exception happend. I don't know why.

Traceback (most recent call last):
  File "/Users/chengpeng/xiedaimala/LeetCode-Anki/main_cn.py", line 11, in <module>
    worker.fetch_accepted_problems()
  File "/Users/chengpeng/xiedaimala/LeetCode-Anki/crawler_cn.py", line 72, in fetch_accepted_problems
    response = self.session.get("https://leetcode-cn.com/api/problems/all/")
  File "/opt/homebrew/lib/python3.9/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/requests/sessions.py", line 665, in send
    history = [resp for resp in gen]
  File "/opt/homebrew/lib/python3.9/site-packages/requests/sessions.py", line 665, in <listcomp>
    history = [resp for resp in gen]
  File "/opt/homebrew/lib/python3.9/site-packages/requests/sessions.py", line 166, in resolve_redirects
    raise TooManyRedirects('Exceeded {} redirects.'.format(self.max_redirects), response=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

image

leetcode的username/password无法正确输入

基本上用的都是最新的版本
MacOS: 10.15.7
Chrome: Version 86.0.4240.111 (Official Build) (x86_64)
Python: 3.8.5

username框出现:YOUR_USERNAME_HERE,随便敲1、2个字母,Chrome就自动关闭啦

Failed to fetch solution?

I get for almost all problems:

Failed to execute <bound method LeetCodeCrawler.fetch_solution of <crawler.LeetCodeCrawler object at 0x105034550>>, Reason: 'NoneType' object is not subscriptable

Any ideas?

无法登录 Leetcode **站

你好,使用的时候发现只能登录 Leetcode 主站,无法登录**站。将所有的 url 链接中的 leetcode 换成 leetcode-cn 也不行,应该是需要改动更多的细节,但不太懂这这方面的内容,请问是否能够添加对 Leetcode **站的支持?

urllib error when running main.py

when I try running the main file, I get

File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)

a ton of these then two errors at the bottom. The first one being SSLCertificate verification failure, and the second being URL open error

does anyone know any solutions to this?

urllib issue

PS C:\Users\v-arasouli\Downloads\LeetCode-Anki-master\LeetCode-Anki-master> python3 main.py
Traceback (most recent call last):
File "C:\Users\v-arasouli\Downloads\LeetCode-Anki-master\LeetCode-Anki-master\main.py", line 2, in
from crawler import LeetCodeCrawler
File "C:\Users\v-arasouli\Downloads\LeetCode-Anki-master\LeetCode-Anki-master\crawler.py", line 7, in
import requests
File "C:\Users\v-arasouli\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests_init_.py", line 43, in
import urllib3
File "C:\Users\v-arasouli\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3_init_.py", line 7, in
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File "C:\Users\v-arasouli\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 11, in
from .exceptions import (
File "C:\Users\v-arasouli\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\exceptions.py", line 2, in
from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
ModuleNotFoundError: No module named 'urllib3.packages.six.moves'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.