Skip to content

Commit

Permalink
Fix tone scraping (#47)
Browse files Browse the repository at this point in the history
* Add Methow Valley Amateur Radio Club repeaters

* Add WA7SAR repeaters

Trustee confirmed that there is no associated website.

* Allow other tags to preceed uplink tone

Currently, the regex assumes that the uplink tone is the only thing in
the cell. My recent queries include comments and <span> tags in the
uplink tone cell preventing recognition of the tone.  Example:

    <tr>
      <td class="gray" nowrap>Uplink Tone:</td>
      <td>
          <!-- Display the value and the pencil on the same line -->
          <span style="display: inline;">
              131.8      </span>

            </td>
    </tr>

---------

Co-authored-by: Matthew Van Gundy <[email protected]>
Co-authored-by: Quentin CAUDRON <[email protected]>
  • Loading branch information
3 people authored Oct 27, 2024
1 parent 5d6824f commit 20f1124
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion assets/programming_files/all_rr_frequencies.csv
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,3 @@
125,WA7SAR,444.600,+5.0,123.0,476,Yakima,FM,Yakima County Radio Amateurs,46.52220154,-120.33300018,+,5.0
126,WA7SAR,145.170,-0.6,123.0,,Quartz Mtn.,FM,Yakima County Radio Amateurs,47.073125,-121.07869,-,0.6
127,WA7SAR,147.080,+0.6,85.4,,Yakima,FM,Yakima County Radio Amateurs,46.6414,-120.3967,+,0.6

4 changes: 2 additions & 2 deletions scripts/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def repeater_from_repeaterbook(id_code: str) -> dict:
source = requests.get(url)

# Extract various pieces of information
start = r"\:\<\/td\>\s+\<td\>\s*"
end = r"\s*\<\/td\>"
start = r"\:\<\/td\>\s+\<td\>(?:\s*(?:\<!--.*?--\>|\<span[^\>]*\>))*\s*"
end = r"(?:\s*\</span\>)*\s*\<\/td\>"

call = re.search(r"callResult.php\?call=(\w{4,6})", source.text).group(1)

Expand Down

0 comments on commit 20f1124

Please sign in to comment.