Skip to content
  1. Apr 26, 2021
  2. Apr 11, 2021
  3. Apr 08, 2021
    • Christophe François's avatar
      [degiro] Do not divide valuation by 100 for GBX invests · 94cd97c4
      Christophe François authored and hydrargyrum's avatar hydrargyrum committed
      The valuation is already in euro, not in GB pence, so it should not be
      converted.
      94cd97c4
    • Christophe François's avatar
      [degiro] Replace CleanDecimal.SI with Decimal to parse json number · bb70f725
      Christophe François authored and hydrargyrum's avatar hydrargyrum committed
      The CleanDecimal is unnecessary when we're already fetching numbers, and
      it could result in unwanted conversions in scientific value, such as
      0.0001 becoming 1E-04.
      bb70f725
    • Christophe François's avatar
      [degiro] Convert GBX into GBP and handle original_unitprice · 49b381cb
      Christophe François authored and hydrargyrum's avatar hydrargyrum committed
      GBX is ambiguous, it's the symbol for both GB Pence and the
      crypto-currency GoByte. We convert them to GBP.
      
      The unitprice is in the original currency of the stock so we need to
      handle original_unitprice when applicable.
      49b381cb
    • Christophe François's avatar
      [degiro] Raise ActionNeeded · b00b7492
      Christophe François authored and hydrargyrum's avatar hydrargyrum committed
      On the website, the user is asked to complete their profile. On the API,
      we have no error until we try to fetch the account's details. At this
      point we get an error 412 without much more info.
      b00b7492
    • Florent Viard's avatar
      [s2e] Only go back to history list from history details once per page · 2b1fc9e0
      Florent Viard authored and hydrargyrum's avatar hydrargyrum committed
      As the website is  stateful, after being on a "History list", if we do a
      request for the details of one entry of the list, we will have to send
      the "going back" request to have the "History list" page again.
      
      But, it is not needed to "go back" to see other "details" pages.
      So, this change improve the performance by only going back once before
      trying to go to the next page of a History list page.
      
      In addition, this might fix some nasty issues as the website is
      "unstable" and could easily have timeout issues. And in that case,
      missing any step could easily break next requests with strange errors.
      2b1fc9e0
    • Florent Viard's avatar
      [s2e] show_more should be ok if we already have the current number of items per page · 4a5bfd23
      Florent Viard authored and hydrargyrum's avatar hydrargyrum committed
      show_more() is called to select the number of items per page.
      It will return False if the selector was not found, and True if it was
      found and successfully changed to the request value.
      
      But, currently, if we found the selector but it was already on the
      correct value, we would return nothing, that would be equivalent to
      False for the "if" test that is used in the browser.py.
      
      This issue associated with a previous issue when "stay_or_go" was used,
      led to having the history entries returned only for a single time, for
      single account, but not for subsequent calls or different accounts.
      4a5bfd23
    • Florent Viard's avatar
      [s2e] Detect when incorrect page content is returned because of of disconnection · 2a33e0fc
      Florent Viard authored and hydrargyrum's avatar hydrargyrum committed
      Sometimes, instead of the expected content, an empty page with just a
      META redirection is returned when it looks like that the user was
      disconnected.
      
      Ex.:
      <!DOCTYPE html><html><head><META http-equiv="refresh" content="0;
      URL=/portal/salarie-axa/operations/consulteroperations"></head><body></body></html>
      
      A further request would encounter 302 redirections to the login page.
      
      In such a case, raise a "Loggedout" exception as previously it was just
      silently ignored and considered as a normal page.
      
      Note: check_disconnected as to be called manually in iter_history, as a
      simple "open" (compared to a "location") will not call the "on_load"
      function of the page.
      2a33e0fc
    • Florent Viard's avatar
      [s2e] Replace stay_or_go call to simple go · db2e9a74
      Florent Viard authored and hydrargyrum's avatar hydrargyrum committed
      The s2e website is stateful, and a lot of different content can match
      the same url, so it is safer to always go back to the inital page.
      
      By only using a go, we can be sure that the good page will be loaded in
      the correct state before trying to use any function of the page.
      db2e9a74
    • Florent Viard's avatar
      [s2e] Fixes profile when called first · 7a57c026
      Florent Viard authored and hydrargyrum's avatar hydrargyrum committed
      Also set the language when calling profile first before already having a
      cookie that had the correct language set by a call to accounts page.
      
      At the same time, to be future proof, add the xpath selectors for the us
      language version of the page.
      7a57c026